Laravel 5 athentication in subdomain is not working

后端 未结 1 1863
無奈伤痛
無奈伤痛 2020-12-22 06:37

I am using a subdomain in my laravel 5 project but when I try to loggin a user, it won\'t authenticate anymore. This is my config\\session.php

r         


        
相关标签:
1条回答
  • 2020-12-22 06:57

    it works now. it just a routes issue on my code. the subdomain in routes.php must be the first and inside on it will be the prefix and etc. like this:

    Route::group(['domain' => '{account_alias}.'.env('APP_URL_NAME')], function () {
        // L3
        Route::group([ 'prefix' => 'app', 'middleware' => 'auth', 'middleware' => 'auth.manager' ], function() {
            Route::get('dashboard', 'DashController@index');
    
    0 讨论(0)
提交回复
热议问题