1
$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

IGP
  • 14,160
  • 4
  • 26
  • 43
Sushi
  • 13
  • 3
  • Where are you running the command? Did you try using double backslash? `php artisan admin:make ArticlesController --model=App\\Articles` – aceraven777 Mar 16 '23 at 05:31

1 Answers1

0

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

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85