forked from REBELinBLUE/deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.php
94 lines (71 loc) · 2.69 KB
/
routes.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
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::group(['middleware' => 'auth'], function () {
Route::get('/', 'DashboardController@index');
Route::get('webhook/{projects}/refresh', 'WebhookController@refresh');
Route::get('projects/{projects}', 'ProjectController@show');
Route::post('projects/{projects}/deploy', [
'as' => 'deploy',
'uses' => 'ProjectController@deploy'
]);
// Deployment details
Route::get('deployment/{deployments}', [ // FIXME Should this be on the deployment controller?
'as' => 'deployment',
'uses' => 'DeploymentController@show'
]);
Route::resource('servers', 'ServerController', [
'only' => ['show', 'store', 'update', 'destroy']
]);
Route::resource('heartbeats', 'HeartbeatController', [
'only' => ['store', 'update', 'destroy']
]);
Route::resource('notifications', 'NotificationController', [
'only' => ['store', 'update', 'destroy']
]);
Route::get('servers/{servers}/test', 'ServerController@test');
Route::get('status/{log}', 'CommandController@status');
Route::get('log/{log}', 'CommandController@log');
Route::resource('commands', 'CommandController', [
'only' => ['store', 'update', 'destroy']
]);
Route::post('commands/reorder', 'CommandController@reorder');
Route::get('projects/{projects}/commands/{step}', [
'as' => 'commands',
'uses' => 'CommandController@listing'
]);
Route::resource('shared-files', 'SharedFilesController');
Route::resource('project-file', 'ProjectFileController');
Route::group(['prefix' => 'admin'], function () {
Route::resource('projects', 'ProjectController', [
'only' => ['index', 'store', 'update', 'destroy']
]);
Route::resource('users', 'UserController', [
'only' => ['index', 'store', 'update', 'destroy']
]);
Route::resource('groups', 'GroupController', [
'only' => ['index', 'store', 'update']
]);
});
});
// Webhooks
Route::post('deploy/{hash}', [
'as' => 'webhook',
'uses' => 'WebhookController@webhook'
]);
Route::get('heartbeat/{hash}', [
'as' => 'heartbeat',
'uses' => 'HeartbeatController@ping'
]);
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController'
]);