1
|
|
|
<?php namespace Arcanesoft\Auth\Providers; |
2
|
|
|
|
3
|
|
|
use Arcanesoft\Auth\Http\Routes; |
4
|
|
|
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class RouteServiceProvider |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Auth\Providers |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class RouteServiceProvider extends ServiceProvider |
13
|
|
|
{ |
14
|
|
|
/* ----------------------------------------------------------------- |
15
|
|
|
| Properties |
16
|
|
|
| ----------------------------------------------------------------- |
17
|
|
|
*/ |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* The admin controller namespace for the application. |
21
|
|
|
* |
22
|
|
|
* @var string |
23
|
|
|
*/ |
24
|
|
|
protected $adminNamespace = 'Arcanesoft\\Auth\\Http\\Controllers\\Admin'; |
25
|
|
|
|
26
|
|
|
/* ----------------------------------------------------------------- |
27
|
|
|
| Main Methods |
28
|
|
|
| ----------------------------------------------------------------- |
29
|
|
|
*/ |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Define the routes for the application. |
33
|
|
|
*/ |
34
|
12 |
|
public function map() |
35
|
|
|
{ |
36
|
|
|
// Admin Routes |
37
|
|
|
$this->adminGroup(function () { |
38
|
|
|
$this->name('auth.')->group(function () { |
39
|
12 |
|
$this->mapAdminRoutes(); |
40
|
12 |
|
}); |
41
|
12 |
|
}); |
42
|
12 |
|
} |
43
|
|
|
|
44
|
|
|
/* ----------------------------------------------------------------- |
45
|
|
|
| Other Methods |
46
|
|
|
| ----------------------------------------------------------------- |
47
|
|
|
*/ |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Define the foundation routes for the application. |
51
|
|
|
*/ |
52
|
12 |
|
protected function mapAdminRoutes() |
53
|
|
|
{ |
54
|
12 |
|
Routes\Admin\ProfileRoutes::register(); |
55
|
|
|
|
56
|
12 |
|
$this->prefix($this->config()->get('arcanesoft.auth.route.prefix', 'authorization')) |
57
|
12 |
|
->group(function () { |
58
|
12 |
|
Routes\Admin\StatsRoutes::register(); |
59
|
12 |
|
Routes\Admin\UsersRoutes::register(); |
60
|
12 |
|
Routes\Admin\RolesRoutes::register(); |
61
|
12 |
|
Routes\Admin\PermissionsRoutes::register(); |
62
|
12 |
|
Routes\Admin\PasswordResetsRoutes::register(); |
63
|
12 |
|
}); |
64
|
12 |
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Register the route bindings. |
68
|
|
|
*/ |
69
|
12 |
|
protected function registerRouteBindings() |
70
|
|
|
{ |
71
|
12 |
|
Routes\Admin\UsersRoutes::bindings(); |
72
|
12 |
|
Routes\Admin\RolesRoutes::bindings(); |
73
|
12 |
|
Routes\Admin\PermissionsRoutes::bindings(); |
74
|
12 |
|
} |
75
|
|
|
} |
76
|
|
|
|