I've just installed Backpack in my Laravel project. I followed the steps for creating general TourCrudController, but I get a 500 error and in logs the main issue is
local.ERROR: Undefined index: columns
. I did not make any changes in CRUD files except the route (made it plural and changed it in crud routes file, view, and TourCrudController). Other CrudControllers work just fine. Could you help me find the issue, please?
class TourCrudController extends CrudController
{
public function setup()
{
$this->crud->setModel('App\Models\Tour');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/tours');
$this->crud->setEntityNameStrings('tour', 'tours');
}
Route::group([
...
], function () { // custom admin routes
Route::crud('tours', 'TourCrudController');
}); // this should be the absolute last line of this file