Skip to content

Commit

Permalink
Fixed Bug (#3596)
Browse files Browse the repository at this point in the history
Fixed bug, when need create bread and DataType table does not has row with this "table name"
trying to get property 'model_name'
  • Loading branch information
jovixv authored and fletch3555 committed Oct 2, 2018
1 parent 0ed3fff commit 0e66c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/VoyagerBreadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function create(Request $request, $table)
$dataType = Voyager::model('DataType')->whereName($table)->first();

$data = $this->prepopulateBreadInfo($table);
$data['fieldOptions'] = SchemaManager::describeTable((strlen($dataType->model_name) != 0)
$data['fieldOptions'] = SchemaManager::describeTable((isset($dataType) && strlen($dataType->model_name) != 0)
? app($dataType->model_name)->getTable()
: $table
);
Expand Down

0 comments on commit 0e66c48

Please sign in to comment.