cartalyst-sentinel

Laravel Sentinel referencing the wrong config file

有些话、适合烂在心里 提交于 2019-12-25 06:55:59
问题 So im using Cartalyst Sentinel to manage authentication and roles in Laravel 5.1. At first i downloaded the package and was adding additional query scopes and defining relations in the vendor/../EloquentUser class. Composer updated the package today and naturally all my code was removed. At which point i realized that i needed to have my own User class which extended EloquentUser and modify the published config file to use my own User class. However it seems that Sentinel is using the config

Laravel 5.2 login session not persisting

最后都变了- 提交于 2019-11-30 18:42:26
I have been implementing a simple authentication system on Laravel 5.2 using Sentinel . // Route : /login $success = Sentinel::authenticate(array( 'email' => $email, 'password' => $password, )); echo $success ? 'Login success' : 'Login failed'; So, the above code outputs Login success after the authentication code. But, the login status is not getting persisted to other requests. ie: if I check the authentication status from other requests, it is saying that I am not logged in! // Route : test-login echo \Sentinel::check() ? 'User is logged in' : 'User is not logged in'; I have even tried to

Laravel Cartalyst Sentinel - Adding a username column to users table (What is the right way)

我们两清 提交于 2019-11-30 09:25:27
I've pulled in cartalyst/sentinel and i've run the migrations required to generate the tables php artisan migrate --package=cartalyst/sentinel I notice that these are the columns available in the users table id email password permissions last_login first_name last_name created_at updated_at I'd like to add username after the email. So i created a migration file that does that. //add a column username after email in the users table $table->string('username')->after('email')->unique(); Now when i use Sentinel::register $credentials = Input::all(); $user = Sentinel::register($credentials); The

Laravel 5.2 login session not persisting

一世执手 提交于 2019-11-30 02:54:51
问题 I have been implementing a simple authentication system on Laravel 5.2 using Sentinel. // Route : /login $success = Sentinel::authenticate(array( 'email' => $email, 'password' => $password, )); echo $success ? 'Login success' : 'Login failed'; So, the above code outputs Login success after the authentication code. But, the login status is not getting persisted to other requests. ie: if I check the authentication status from other requests, it is saying that I am not logged in! // Route : test

Laravel Cartalyst Sentinel - Adding a username column to users table (What is the right way)

浪子不回头ぞ 提交于 2019-11-29 14:24:48
问题 I've pulled in cartalyst/sentinel and i've run the migrations required to generate the tables php artisan migrate --package=cartalyst/sentinel I notice that these are the columns available in the users table id email password permissions last_login first_name last_name created_at updated_at I'd like to add username after the email. So i created a migration file that does that. //add a column username after email in the users table $table->string('username')->after('email')->unique(); Now when