Laravel-Backpack / demo

A working demo of Laravel with all Backpack packages installed.
http://backpackforlaravel.com
Other
333 stars 165 forks source link

Cant get my CRUD to work #16

Closed subkams closed 7 years ago

subkams commented 7 years ago

Hi,

Tried the Demo package which works fine. But on generating my own models + CRUD as per instructions given on the site I am not able to access the Models CRUD pages.

As shown in the Readme, I have place the controllers in the
backpack-demo\app\Http\Controllers\Admin path, bu t i see that the CRUDs in the demo package are placed in the backpack-demo\vendor\backpack\menucrud\src\app\Http\Controllers\Admin ( MenuOps) backpack-demo is the folder into which i have created the laravel app.

Even the image put up in the readme shows the same path that i have used.

This is my routes file backpack-demo\app\Http\routes.php Route::get('/', function () { return view('welcome'); });

Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth'], 'namespace' => 'Admin'], function () { // Backpack\MenuCRUD CRUD::resource('menu-item', 'MenuItemCrudController'); CRUD::resource('products', 'ProductsCrudController'); CRUD::resource('locations', 'LocationsCrudController'); CRUD::resource('zones', 'ZonesCrudController'); CRUD::resource('agents', 'AgentsCrudController'); });

Also I keep getting a VerifyCSRFToken issue

Can you help me with these two issues. Where am i making a mistake.

Thanks

OwenMelbz commented 7 years ago

Hi @subkams it looks like you're using an old version of laravel, as the routes.php has moved to /routes/web.php

Its not recommended that you use the backpack demo, its designed for a demo, and not to be used for an actual application.

I would recommend starting a new project from the instructions explained https://laravel-backpack.readme.io/docs/installation-on-laravel-53