-
Notifications
You must be signed in to change notification settings - Fork 144
/
routes.php
73 lines (54 loc) · 2.78 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
<?php
Route::group(array('prefix' => 'panel', 'middleware' => ['web','PanelAuth']), function()
{
// main page for the admin section (app/views/admin/dashboard.blade.php)
Route::get('/', function(){
$version = '';
try
{
$composer_lock = json_decode(File::get(base_path().'/composer.lock'),true);
foreach($composer_lock['packages'] as $key=>$value){
if($value['name'] =="serverfireteam/panel")
$version = $value['version'];
}
}
catch (Exception $exception)
{
\Log::warning("I can't found composer.lock for laravelpanel ");
}
return View::make('panelViews::dashboard')->with('version', $version);
});
/**
* Check Permission only on Model Controllers
*/
Route::group(array('middleware' => ['PermissionPanel']), function()
{
Route::any('/{entity}/export/{type}', array('uses' => 'Serverfireteam\Panel\ExportImportController@export'));
Route::post('/{entity}/import', array('uses' => 'Serverfireteam\Panel\ExportImportController@import'));
Route::any('/{entity}/{methods}', array('uses' => 'Serverfireteam\Panel\MainController@entityUrl'));
Route::post('/edit', array('uses' => 'Serverfireteam\Panel\ProfileController@postEdit'));
Route::get('/edit', array('uses' => 'Serverfireteam\Panel\ProfileController@getEdit'));
});
/**
* Admin userPassword change
*/
Route::get('/changePassword', array('uses' => 'Serverfireteam\Panel\RemindersController@getChangePassword'));
Route::post('/changePassword', array('uses' => 'Serverfireteam\Panel\RemindersController@postChangePassword'));
});
Route::group(array('middleware' => ['web']), function()
{
Route::post('/panel/login', array('uses' => 'Serverfireteam\Panel\AuthController@postLogin'));
Route::get('/panel/password/reset/{token}', function ($token){
return View::make('panelViews::passwordReset')->with('token', $token);
});
Route::get('/panel/logout', array('uses' => 'Serverfireteam\Panel\AuthController@doLogout'));
Route::post('/panel/reset', array('uses' => 'Serverfireteam\Panel\RemindersController@postReset'));
Route::get('/panel/reset', array('uses' => 'Serverfireteam\Panel\RemindersController@getReset'));
Route::get('/panel/remind', array('uses' => 'Serverfireteam\Panel\RemindersController@getRemind'));
Route::post('/panel/remind', array('uses' => 'Serverfireteam\Panel\RemindersController@postRemind'));
Route::get('/panel/login', array('uses' => 'Serverfireteam\Panel\AuthController@getLogin'));
});
Route::group(array('prefix' => 'elfinder', 'middleware' => ['web','PanelAuth']), function()
{
Route::get('tinymce4/{input_id}', array('uses' => 'Barryvdh\Elfinder\ElfinderController@showPopup'));
});