How to create Creating a Controller ?
Answer / sunil kumar
Open the terminal based on the operating system you are using and type the following command to create controller using the Artisan CLI (Command Line Interface).
Syntax : Route::get(‘base URI’,’controller@method’);
Example : php artisan make:controller <controller-name> --plain
It describes above example Replace the <controller-name> with the name of your controller.
This will create a plain constructor as we are passing the argument — plain.
If you don’t want to create a plain constructor, you can simply ignore the argument.
The created constructor can be seen at app/Http/Controllers.
Is This Answer Correct ? | 0 Yes | 0 No |
Which is better django or laravel?
What is console in laravel?
What is a Composer command ?
Which js framework is best with laravel?
What is Basic Response in Laravel ?
Does laravel use mvc?
Explain how to install valet?
How to use update query in laravel?
What do you mean by bundles?
How to get, set, distroy cookies in laravel?
What is the use of slug in laravel?
What is db facade?