PHP code example of exodusanto / laravel-concierge

1. Go to this page and download the library: Download exodusanto/laravel-concierge 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/ */

    

exodusanto / laravel-concierge example snippets


// app/Http/Kernel.php
protected $middlewareGroups = [
    'web' => [
        ...
        \Exodusanto\Concierge\Http\Middleware\RefreshApiToken::class,
    ],
 php
Schema::table('users', function (Blueprint $table) {
    $table->string('api_token')->nullable();
    $table->timestamp('api_token_refreshed_at')->nullable();
});
bash
php artisan vendor:publish --tag=concierge-config
 php
// config/auth.php
'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\User::class,
    ],
]

// config/concierge.php
'tokens_lifetime' => [
    'users' => 10800 // 3h
]