PHP code example of mobihouse / laravel-pennant-cookie

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

    

mobihouse / laravel-pennant-cookie example snippets


return [

    'stores' => [
        
        // ...
        'cookie' => [
            'driver' => 'cookie'
        ]

    ]

]


 
namespace App\Providers;
 
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\ServiceProvider;
use Laravel\Pennant\Feature;
 
class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Feature::resolveScopeUsing(fn () => null);
 
        // ...
    }
}


return [

    'stores' => [
        'cookie' => [
            'driver' => 'cookie',
            'lifetime' => 3600, // Live for one hour
        ]
    ]

]