Answers for "laravel route controller"

PHP
27

laravel create controller

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

laravel route controller

use App\Http\Controllers\UserController;

Route::get('user/{id}', [UserController::class, 'show']);
Posted by: Guest on November-29-2020
4

laravel controller middleware

class UserController extends Controller
{
    /**
     * Instantiate a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');

        $this->middleware('log')->only('index');

        $this->middleware('subscribed')->except('store');
    }
}
Posted by: Guest on May-08-2020
0

Laravel route not calling function of controller

//in the terminal run
composer dump-autoload
Posted by: Guest on April-29-2020

Code answers related to "laravel route controller"

Browse Popular Code Answers by Language