artisan command to create controller in laravel using controller code example
Example 1: how to create controller in laravel
php artisan make:controller PhotoController --resource
Example 2: controller in laravel 8
Rout::get('/test' , [TestController::class , 'index']);