PHP code example of tim-online / laravel-auth-pubtkt

1. Go to this page and download the library: Download tim-online/laravel-auth-pubtkt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tim-online / laravel-auth-pubtkt example snippets

 php
// config/app.php
'providers' => [
    ...
    Timonline\AuthPubtkt\AuthPubtktServiceProvider::class
    ...
];
 bash
php artisan vendor:publish --provider="Timonline\AuthPubtkt\AuthPubtktServiceProvider"
 php
/**
 * The names of the cookies that should not be encrypted.
 *
 * @var array
 */
protected $except = [
    'auth_pubtkt',
];
 php
protected function redirectTo(Request $request)
{
    return $request->input('back', '/home');
}
 php
Spark::afterLoginRedirectTo(function() {
    $request = app('request');
    return $request->input('back', '/home');
});