public function create(Request $request, $table)
    {
        $this->authorize('browse_bread');

        $dataType = Voyager::model('DataType')->whereName($table)->first();

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

        return Voyager::view('voyager::tools.bread.edit-add', $data);
    }
public function create(Request $request, $table)
    {
        $this->authorize('browse_bread');

        $dataType = Voyager::model('DataType')->whereName($table)->first();

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

        return Voyager::view('voyager::tools.bread.edit-add', $data);
    }
public function create ( Request $ request , $ table ) { $ this -> authorize ( 'browse_bread' ) ; $ dataType = Voyager :: model ( 'DataType' ) -> whereName ( $ table ) -> first ( ) ; $ data = $ this -> prepopulateBreadInfo ( $ table ) ; $ data [ 'fieldOptions' ] = SchemaManager :: describeTable ( ( isset ( $ dataType ) && strlen ( $ dataType -> model_name ) != 0 ) ? app ( $ dataType -> model_name ) -> getTable ( ) : $ table ) ; return Voyager :: view ( 'voyager::tools.bread.edit-add' , $ data ) ; }
Create BREAD.

@param Request $request
@param string  $table   Table name.

@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
Create BREAD .