-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data from a SQL Server #113
Comments
Hi @guillermohaad , What column type triggers the error? If you remove the columns one by one, which one is the problem? Then copy-paste your code, please. Cheers! |
friend @tabacitu attached below code model and controller modelhasMany('App\Models\vehiculo', 'vehicle_tipo'); } ``` /* |-------------------------------------------------------------------------- | SCOPES |-------------------------------------------------------------------------- */ /* |-------------------------------------------------------------------------- | ACCESORS |-------------------------------------------------------------------------- */ /* |-------------------------------------------------------------------------- | MUTATORS |-------------------------------------------------------------------------- */ ``` } ## controler crud->setModel("App\Models\Vehiculos"); $this->crud->setRoute("admin/vehiculos"); $this->crud->setEntityNameStrings('vehiculos', 'vehiculos'); //$this->crud->allowAccess('reorder'); //$this->crud->enableReorder('placa', 2); /* |-------------------------------------------------------------------------- | BASIC CRUD INFORMATION |-------------------------------------------------------------------------- */ $this->crud->setColumns(['entcode']); $this->crud->setColumns(['entetpcode']); $this->crud->addField([ 'name' => 'entcode', 'label' => "Placa" ]); $this->crud->addField([ 'name' => 'entetpcode', 'label' => 'Tipo', ]); $this->crud->setFromDb(); // ------ CRUD FIELDS // $this->crud->addField($options, 'update/create/both'); // $this->crud->addFields($array_of_arrays, 'update/create/both'); // $this->crud->removeField('name', 'update/create/both'); // $this->crud->removeFields($array_of_names, 'update/create/both'); // ------ CRUD COLUMNS // $this->crud->addColumn(); // add a single column, at the end of the stack // $this->crud->addColumns(); // add multiple columns, at the end of the stack // $this->crud->removeColumn('column_name'); // remove a column from the stack // $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack // $this->crud->setColumnDetails('column_name', ['attribute' => 'value']); // $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']); // ------ CRUD ACCESS // $this->crud->allowAccess(['list', 'create', 'update', 'reorder', 'delete']); // $this->crud->denyAccess(['list', 'create', 'update', 'reorder', 'delete']); // ------ CRUD REORDER // $this->crud->enableReorder('label_name', MAX_TREE_LEVEL); // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('reorder'); // ------ CRUD DETAILS ROW // $this->crud->enableDetailsRow(); // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('details_row'); // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php // ------ AJAX TABLE VIEW // Please note the drawbacks of this though: // - 1-n and n-n columns are not searchable // - date and datetime columns won't be sortable anymore // $this->crud->enableAjaxTable(); // ------ ADVANCED QUERIES // $this->crud->addClause('active'); // $this->crud->addClause('type', 'car'); // $this->crud->addClause('where', 'name', '==', 'car'); // $this->crud->addClause('whereName', 'car'); // $this->crud->addClause('whereHas', 'posts', function($query) { // $query->activePosts(); // }); // $this->crud->orderBy(); // $this->crud->groupBy(); // $this->crud->limit(); } public function store(StoreRequest $request) { return parent::storeCrud(); } public function update(UpdateRequest $request) { return parent::updateCrud(); } ``` ## } |
...I have no idea... If you create the same table in MySQL and use that, does it work? Do you have any way to test that? Cheers! |
I create the same table in MySQL It works well, not problem. |
Damn. SQL Server it's not officially supported by Backpack and I have no way to test it, but unofficially, Eloquent should take care of every database operation, no matter the DBMS.
Cheers! |
hi friend @tabacitu ,I did what you said but shows no errors. I'm puzzled. |
Hi @guillermohaad . It isn't supposed to show errors. The It's pretty difficult to do, but it's the only way, I think. Cheers! |
I understand my friend, I'll try to get the error. |
I'm working with BackPack\CRUD, I need to show display data from a SQL Server table in a Dropdwon control. I could already connect but displays a blank page in the view?
I need to change anything else?
Deputy evidence
The text was updated successfully, but these errors were encountered: