Laravel redirect with logout not working

前端 未结 7 1234
夕颜
夕颜 2021-01-30 09:41

I am Using laravel 4 framework\'s. When I used redirect after the Auth::logout(), the redirection was not working. I used View::make() too, but same \"Whoops, looks like somethi

7条回答
  •  有刺的猬
    2021-01-30 10:14

    If you have Laravel 4.2 you can do this:

    Command Line:

    php artisan migrate:make add_remember_token_to_users_table --table="users"
    

    After this open the file app/database/migrations/2014_10_16_124421_add_remember_token_to_users_table and edit it like this:

    public function up()
    {
        Schema::table('users', function(Blueprint $table)
        {
            $table->rememberToken();
        });
    }
    
    public function down()
    {
        Schema::table('users', function(Blueprint $table)
        {
            $table->dropColumn('remember_token');
        });
    }
    

提交回复
热议问题