laravel-auth-token
laravel-auth-token copied to clipboard
How To document
Seed your User table: http://laravel.com/docs/migrations
php artisan serve # In your first terminal
php artisan tinker # http://laravel-recipes.com/recipes/280
$user = User::find(1); $authToken = AuthToken::create($user); $publicToken = AuthToken::publicToken($authToken);
//Test a valid token
$login = AuthToken::driver()->validate($publicToken); print_r($login);
//Test an invalid token
$bad = AuthToken::driver()->validate('badToken'); print_r($bad);
exit;
Thanks for sharing -- this was pretty helpful in attempting to wrap my head around this package!