Newer
Older
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
<?php
Route::set('apiv0:teacher', 'api/v0/teacher')
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Teacher',
]);
Route::set('apiv0:department', 'api/v0/department')
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Department',
]);
Route::set('apiv0:department:another', 'api/v0/department(/<action>(/<id>))', ['id' => '\d+'])
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Department',
]);
Route::set('apiv0:student', 'api/v0/student')
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Student',
]);
Route::set('apiv0:student:get', 'api/v0/student(/<id>)', ['id' => '\d+'])
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Student',
]);
Route::set('apiv0:student:another', 'api/v0/student(/<action>(/<id>))', ['id' => '\d+'])
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Student',
]);
Route::set('apiv0:subject', 'api/v0/subject')
->filter(function($route, $params, $request)
{
// Prefix the method to the action name
$params['action'] = strtolower($request->method()).'_'.$params['action'];
return $params; // Returning an array will replace the parameters
})
->defaults([
'action' => 'index',
'directory' => 'Api/V0',
'controller' => 'Subject',
]);