Laravel admin controller

181 views Asked by At
$router->get('/', 'HomeController@index')->name('home');
$router->resource('users', UserController::class); //user auth

This is the command in laravel 7 to generate new controller which articles except for user but I got some issues where the error said the Model does not exist!

php artisan admin:make ArticlesController --model=App\Articles

above the command that I used

1

There are 1 answers

1
Abdulla Nilam On BEST ANSWER

If model Articles exist, you can use

php artisan admin:make ArticlesController --model=Articles

By default, models are created in the App directory in Laravel 7.


If you use App\Articles Laravel assume your model name as AppArticles. enter image description here

if you need to create in the custom path, then use double \\ like this

enter image description here