-
Notifications
You must be signed in to change notification settings - Fork 165
/
base.php
111 lines (90 loc) · 4.76 KB
/
base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
return [
/*
|--------------------------------------------------------------------------
| Registration Open
|--------------------------------------------------------------------------
|
| Choose whether new users/admins are allowed to register.
| This will show the Register button on the login page and allow access to the
| Register functions in AuthController.
|
| By default the registration is open only on localhost.
*/
'registration_open' => env('BACKPACK_REGISTRATION_OPEN', env('APP_ENV') === 'local'),
/*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/
// The prefix used in all base routes (the 'admin' in admin/dashboard)
// You can make sure all your URLs use this prefix by using the backpack_url() helper instead of url()
'route_prefix' => 'admin',
// Set this to false if you would like to use your own AuthController and PasswordController
// (you then need to setup your auth routes manually in your routes.php file)
'setup_auth_routes' => true,
// Set this to false if you would like to skip adding the dashboard routes
// (you then need to overwrite the login route on your AuthController)
'setup_dashboard_routes' => true,
// Set this to false if you would like to skip adding "my account" routes
// (you then need to manually define the routes in your web.php)
'setup_my_account_routes' => true,
// Set this to true if you would like to enable email verification for your user model.
// Make sure your user model implements the MustVerifyEmail contract and your database
// table contains the `email_verified_at` column. Read the following before enabling:
// https://backpackforlaravel.com/docs/6.x/base-how-to#enable-email-verification-in-backpack-routes
'setup_email_verification_routes' => (env('APP_ENV') === 'local'),
// When email verification is enabled, automatically add the Verified middleware to Backpack routes?
// Set false if you want to use your own Verified middleware in `middleware_class`.
'setup_email_verification_middleware' => true,
// How many times in any given time period should the user be allowed to
// request a new verification email?
// Defaults to 1,10 - 1 time in 10 minutes.
'email_verification_throttle_access' => '3,15',
/*
|--------------------------------------------------------------------------
| Authentication
|--------------------------------------------------------------------------
*/
// Fully qualified namespace of the User model
'user_model_fqn' => App\User::class,
// The classes for the middleware to check if the visitor is an admin
// Can be a single class or an array of clases
'middleware_class' => [
App\Http\Middleware\CheckIfAdmin::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\Backpack\LanguageSwitcher\Http\Middleware\LanguageSwitcherMiddleware::class,
// \Backpack\CRUD\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class,
],
// Alias for that middleware
'middleware_key' => 'admin',
// Note: It's recommended to use the backpack_middleware() helper everywhere, which pulls this key for you.
// Username column for authentication
// The Backpack default is the same as the Laravel default (email)
// If you need to switch to username, you also need to create that column in your db
'authentication_column' => 'email',
'authentication_column_name' => 'Email',
// The guard that protects the Backpack admin panel.
// If null, the config.auth.defaults.guard value will be used.
'guard' => 'backpack',
// The password reset configuration for Backpack.
// If null, the config.auth.defaults.passwords value will be used.
'passwords' => 'backpack',
// What kind of avatar will you like to show to the user?
// Default: gravatar (automatically use the gravatar for his email)
// Other options:
// - placehold (generic image with his first letter)
// - example_method_name (specify the method on the User model that returns the URL)
'avatar_type' => 'gravatar',
/*
|--------------------------------------------------------------------------
| File System
|--------------------------------------------------------------------------
*/
// Backpack\Base sets up its own filesystem disk, just like you would by
// adding an entry to your config/filesystems.php. It points to the root
// of your project and it's used throughout all Backpack packages.
//
// You can rename this disk here. Default: root
'root_disk_name' => 'root',
];