-
Notifications
You must be signed in to change notification settings - Fork 2
/
RouteServiceProvider.txt
132 lines (111 loc) · 3.34 KB
/
RouteServiceProvider.txt
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Config\Router;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes(); // Web Route is being used for managin the applicatoin
$this->mapAddonRoutes(); // Addon Route is being used for managin the Addons
$this->mapStudentRoutes(); // Addon Route is being used for managin the Student
$this->mapSettingsRoutes(); // Settings Route is being used for managin the Settings
$this->mapAccountingRoutes(); // Accounting Route is being used for managin the Accounting staffs
// $this->mapInstallRoutes(); // Install route is being used for managing the installation process
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
Router::router();
}
protected function mapInstallRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/install.php'));
}
protected function mapLessonsRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/lessons.php'));
}
protected function mapAddonRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/addon.php'));
}
protected function mapStudentRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/student.php'));
}
protected function mapSettingsRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/settings.php'));
}
protected function mapAccountingRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/accounting.php'));
}
protected function mapMultiSchoolRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/school.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}