Let's say, you want to create a resources controller and a model by a single command. Most of us know that command. Suppose the model is 'User'. So the command will be
php artisan make:model User -mcr
But, when you want to connect a resources controller with an existing model, well, there is option here....
You need to write the following command.
php artisan make:controller UserController -m User
Thank you. Happy coding!
Top comments (0)