PHP code example of aladler / laravel-pennant-session-and-db-driver
1. Go to this page and download the library: Download aladler/laravel-pennant-session-and-db-driver 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/ */
aladler / laravel-pennant-session-and-db-driver example snippets
'stores' => [
'session_and_database' => [
'driver' => 'session_and_database',
'table' => 'features',
],
],
public function boot(): void
{
Feature::extend('session_and_database', function (){
return new SessionAndDatabaseDriver(
app()['db'],
app()['events'],
config(),
[],
app()['session']
);
});
}
'default' => env('PENNANT_STORE', 'session_and_database'),
class User extends Authenticable implements UserThatHasPreRegisterFeatures