1
|
|
|
<?php namespace Arcanesoft\Seo\Providers; |
2
|
|
|
|
3
|
|
|
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider; |
4
|
|
|
use Arcanesoft\Seo\Http\Routes; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class RouteServiceProvider |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Seo\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\\Seo\\Http\\Controllers\\Admin'; |
25
|
|
|
|
26
|
|
|
/* ----------------------------------------------------------------- |
27
|
|
|
| Main Methods |
28
|
|
|
| ----------------------------------------------------------------- |
29
|
|
|
*/ |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Define the routes for the application. |
33
|
|
|
*/ |
34
|
32 |
|
public function map() |
35
|
|
|
{ |
36
|
|
|
$this->adminGroup(function () { |
37
|
32 |
|
$this->mapAdminRoutes(); |
38
|
32 |
|
}); |
39
|
|
|
|
40
|
32 |
|
$this->mapPublicRoutes(); |
41
|
32 |
|
} |
42
|
|
|
|
43
|
|
|
/* ----------------------------------------------------------------- |
44
|
|
|
| Other Methods |
45
|
|
|
| ----------------------------------------------------------------- |
46
|
|
|
*/ |
47
|
|
|
/** |
48
|
|
|
* Register the route bindings. |
49
|
|
|
*/ |
50
|
32 |
|
protected function registerRouteBindings() |
51
|
|
|
{ |
52
|
32 |
|
Routes\Admin\PagesRoutes::bindings(); |
53
|
32 |
|
Routes\Admin\FootersRoutes::bindings(); |
54
|
32 |
|
Routes\Admin\MetasRoutes::bindings(); |
55
|
32 |
|
Routes\Admin\RedirectsRoutes::bindings(); |
56
|
32 |
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Map the admin routes. |
60
|
|
|
*/ |
61
|
32 |
|
protected function mapAdminRoutes() |
62
|
|
|
{ |
63
|
32 |
|
$this->name('seo.') |
64
|
32 |
|
->prefix($this->config()->get('arcanesoft.seo.route.prefix', 'seo')) |
65
|
32 |
|
->group(function () { |
66
|
32 |
|
Routes\Admin\DashboardRoutes::register(); |
67
|
32 |
|
Routes\Admin\PagesRoutes::register(); |
68
|
32 |
|
Routes\Admin\FootersRoutes::register(); |
69
|
32 |
|
Routes\Admin\MetasRoutes::register(); |
70
|
32 |
|
Routes\Admin\RedirectsRoutes::register(); |
71
|
32 |
|
Routes\Admin\SpammersRoutes::register(); |
72
|
32 |
|
Routes\Admin\SettingsRoutes::register(); |
73
|
32 |
|
}); |
74
|
32 |
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Map the public routes. |
78
|
|
|
*/ |
79
|
32 |
|
protected function mapPublicRoutes() |
80
|
|
|
{ |
81
|
32 |
|
Routes\Front\FootersRoutes::register(); |
82
|
32 |
|
} |
83
|
|
|
} |
84
|
|
|
|