Skip to content

Commit b9ebf27

Browse files
committed
config sort
1 parent 603a7ce commit b9ebf27

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

config/magiclink.php

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22

33
return [
44

5+
'access_code' => [
6+
'view' => 'magiclink::ask-for-access-code-form',
7+
],
8+
9+
/*
10+
|--------------------------------------------------------------------------
11+
| Disable default route
12+
|--------------------------------------------------------------------------
13+
|
14+
| If you wish use your custom controller, you can invalidate the
15+
| default route of magic link, mark this configuration as true,
16+
| and add your custom route with the middleware:
17+
| MagicLink\Middlewares\MagiclinkMiddleware
18+
|
19+
*/
20+
'disable_default_route' => false,
21+
22+
/*
23+
|--------------------------------------------------------------------------
24+
| Response when token is invalid
25+
|--------------------------------------------------------------------------
26+
|
27+
| Here you may specify the class with method __invoke to get the response
28+
| when token is invalid
29+
|
30+
*/
31+
'invalid_response' => [
32+
'class' => MagicLink\Responses\Response::class,
33+
],
34+
535
'token' => [
636
/*
737
|--------------------------------------------------------------------------
@@ -18,53 +48,25 @@
1848
'url' => [
1949
/*
2050
|--------------------------------------------------------------------------
21-
| Path to Validate Token and Auto Auth
51+
| Path default to redirect
2252
|--------------------------------------------------------------------------
2353
|
2454
| Here you may specify the name of the path you'd like to use so that
25-
| the verify token and auth in system.
55+
| the redirect when verify correct token.
2656
|
2757
*/
28-
'validate_path' => 'magiclink',
58+
'redirect_default' => '/',
59+
2960
/*
3061
|--------------------------------------------------------------------------
31-
| Path default to redirect
62+
| Path to Validate Token and Auto Auth
3263
|--------------------------------------------------------------------------
3364
|
3465
| Here you may specify the name of the path you'd like to use so that
35-
| the redirect when verify correct token.
66+
| the verify token and auth in system.
3667
|
3768
*/
38-
'redirect_default' => '/',
39-
],
40-
41-
/*
42-
|--------------------------------------------------------------------------
43-
| Response when token is invalid
44-
|--------------------------------------------------------------------------
45-
|
46-
| Here you may specify the class with method __invoke to get the response
47-
| when token is invalid
48-
|
49-
*/
50-
'invalid_response' => [
51-
'class' => MagicLink\Responses\Response::class,
69+
'validate_path' => 'magiclink',
5270
],
5371

54-
/*
55-
|--------------------------------------------------------------------------
56-
| Disable default route
57-
|--------------------------------------------------------------------------
58-
|
59-
| If you wish use your custom controller, you can invalidate the
60-
| default route of magic link, mark this configuration as true,
61-
| and add your custom route with the middleware:
62-
| MagicLink\Middlewares\MagiclinkMiddleware
63-
|
64-
*/
65-
'disable_default_route' => false,
66-
67-
'access_code' => [
68-
'view' => 'magiclink::ask-for-access-code-form',
69-
]
7072
];

0 commit comments

Comments
 (0)