Sushi
Sushi

Reputation: 13

Laravel admin controller

$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

Upvotes: 1

Views: 419

Answers (1)

Abdulla Nilam
Abdulla Nilam

Reputation: 38652

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

Upvotes: 0

Related Questions