0

I'm working on a modules Laravel project, and I wonder if it is possible to create model, migration and controller in single command (artisan).

I'm already aware of this command:

php artisan make:model Todo -mcr

This only works in a default Laravel project not a modular one.

I also read all the commands in modular artisan commands docs, but there is no mention of this issue.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Arian Fm
  • 314
  • 4
  • 14
  • 2
    The documentation on [Resource Controllers](https://laravel.com/docs/9.x/controllers#resource-controllers) has example routes – brombeer May 24 '22 at 18:26
  • I closed this as a duplicate, as the syntax you were using in Laravel 6 is no longer valid in Laravel 8+. It _can_ be if you would like to keep using it, which the linked question/answer demonstrates this. – Tim Lewis May 24 '22 at 19:48

1 Answers1

1

Following the official documentation :

use App\Http\Controllers\ArticleController;
 
Route::resource('articles', ArticleController::class);
Jérôme
  • 978
  • 1
  • 9
  • 22