PHP code example of lbausch / flarum-laravel-session
1. Go to this page and download the library: Download lbausch/flarum-laravel-session 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/ */
lbausch / flarum-laravel-session example snippets
/**
* The application's middleware aliases.
*
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
// ...
'flarum' => \Bausch\FlarumLaravelSession\FlarumSessionMiddleware::class,
// ...
];
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Bausch\FlarumLaravelSession\FlarumLaravelSession;
use App\Handlers\YourCustomHandler;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
FlarumLaravelSession::handleIdentifiedUser(YourCustomHandler::class);
}
}
// Note the dot before domain.tld
'cookie' => ['domain' => '.domain.tld'],
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.