Answers for "laravel controller class with"

36

laravel create controller

php artisan make:controller MyController
Posted by: Guest on May-07-2020
1

types of controller in laravel

-types of controller:
	-basic controller
		-php artisan make:controller basicController
		-Route: Route::get('about',[basicController::class,'about']);
	-single action controller	(handle single action)
		public function __invoke(){//inbuilt}
		-php artisan make:controller singleActionController --invokable
		-Route::get('course',singleActionController::class); //it will invoke only one function
	-resource controller (CRUD functions)
		-Route::resource('photo',photoController::class);  //invoke index function
Posted by: Guest on December-09-2021

Code answers related to "laravel controller class with"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language