Skip to content

Commit 9902793

Browse files
committed
Update code samples
1 parent 49bddea commit 9902793

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ composer require lbausch/flarum-laravel-session
3838
Register the `\Bausch\FlarumLaravelSession\FlarumSessionMiddleware` middleware in `app/Http/Kernel.php`:
3939
```php
4040
/**
41-
* The application's route middleware.
41+
* The application's middleware aliases.
4242
*
43-
* These middleware may be assigned to groups or used individually.
43+
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
4444
*
45-
* @var array
45+
* @var array<string, class-string|string>
4646
*/
47-
protected $routeMiddleware = [
47+
protected $middlewareAliases = [
4848
// ...
4949
'flarum' => \Bausch\FlarumLaravelSession\FlarumSessionMiddleware::class,
5050
// ...
@@ -84,7 +84,7 @@ To avoid Laravel from trying to encrypt the Flarum session cookie, add the follo
8484
/**
8585
* The names of the cookies that should not be encrypted.
8686
*
87-
* @var array
87+
* @var array<int, string>
8888
*/
8989
protected $except = [
9090
'flarum_session',
@@ -121,10 +121,8 @@ class AppServiceProvider extends ServiceProvider
121121
{
122122
/**
123123
* Register any application services.
124-
*
125-
* @return void
126124
*/
127-
public function register()
125+
public function register(): void
128126
{
129127
//
130128
}
@@ -134,7 +132,7 @@ class AppServiceProvider extends ServiceProvider
134132
*
135133
* @return void
136134
*/
137-
public function boot()
135+
public function boot(): void
138136
{
139137
FlarumLaravelSession::handleIdentifiedUser(YourCustomHandler::class);
140138
}

0 commit comments

Comments
 (0)