Heimdall/routes/web.php

90 lines
2.9 KiB
PHP
Raw Normal View History

2018-01-26 14:35:01 +00:00
<?php
2018-10-28 20:41:46 +00:00
use Illuminate\Http\Request;
2018-01-26 14:35:01 +00:00
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
2019-06-18 09:51:51 +00:00
if(\Config::get('app.url') !== 'http://localhost') {
URL::forceRootUrl(\Config::get('app.url'));
}
2018-10-14 16:27:28 +00:00
Route::get('/userselect/{user}', 'Auth\LoginController@setUser')->name('user.set');
2018-10-15 12:02:16 +00:00
Route::get('/userselect', 'UserController@selectUser')->name('user.select');
2018-10-15 08:52:36 +00:00
Route::get('/autologin/{uuid}', 'Auth\LoginController@autologin')->name('user.autologin');
2018-10-14 15:17:55 +00:00
2018-02-01 19:55:03 +00:00
Route::get('/', 'ItemController@dash')->name('dash');
2018-10-18 14:59:38 +00:00
Route::get('check_app_list', 'ItemController@checkAppList')->name('applist');
Route::get('single/{appid}', function($appid) {
return json_encode(\App\Application::single($appid));
})->name('single');
2018-01-29 12:41:57 +00:00
Route::resources([
'items' => 'ItemController',
2018-02-17 00:13:38 +00:00
'tags' => 'TagController',
]);
2018-02-17 00:13:38 +00:00
2018-10-18 14:59:38 +00:00
2018-02-17 00:13:38 +00:00
Route::get('tag/{slug}', 'TagController@show')->name('tags.show');
Route::get('tag/add/{tag}/{item}', 'TagController@add')->name('tags.add');
2019-01-16 12:02:38 +00:00
Route::get('tag/restore/{id}', 'TagController@restore')->name('tags.restore');
2018-02-17 00:13:38 +00:00
2022-03-16 15:49:44 +00:00
Route::get('items/websitelookup/{url}', 'ItemController@websitelookup')->name('items.lookup');
Route::get('items/pin/{id}', 'ItemController@pin')->name('items.pin');
2018-02-03 15:46:14 +00:00
Route::get('items/restore/{id}', 'ItemController@restore')->name('items.restore');
Route::get('items/unpin/{id}', 'ItemController@unpin')->name('items.unpin');
Route::get('items/pintoggle/{id}/{ajax?}/{tag?}', 'ItemController@pinToggle')->name('items.pintoggle');
2018-02-04 20:50:59 +00:00
Route::post('order', 'ItemController@setOrder')->name('items.order');
2018-02-05 19:43:24 +00:00
Route::post('appload', 'ItemController@appload')->name('appload');
Route::post('test_config', 'ItemController@testConfig')->name('test_config');
2022-03-11 19:03:03 +00:00
Route::get('get_stats/{id}', 'ItemController@getStats')->name('get_stats');
2018-02-05 19:43:24 +00:00
2019-01-18 15:21:50 +00:00
Route::get('/search', 'SearchController@index')->name('search');
2018-02-05 23:08:37 +00:00
Route::get('view/{name_view}', function ($name_view) {
2018-10-29 19:43:08 +00:00
return view('SupportedApps::'.$name_view)->render();
2018-02-05 23:08:37 +00:00
});
2018-10-28 20:41:46 +00:00
Route::get('titlecolour', function (Request $request) {
$color = $request->input('color');
if($color) {
return title_color($color);
};
})->name('titlecolour');
2018-10-12 13:57:46 +00:00
Route::resource('users', 'UserController');
2018-02-04 20:50:59 +00:00
/**
* Settings.
*/
Route::group([
'as' => 'settings.',
'prefix' => 'settings',
], function () {
Route::get('/', 'SettingsController@index')
->name('index');
Route::get('edit/{id}', 'SettingsController@edit')
->name('edit');
Route::get('clear/{id}', 'SettingsController@clear')
->name('clear');
2018-02-04 20:50:59 +00:00
2018-02-04 21:28:11 +00:00
Route::patch('edit/{id}', 'SettingsController@update');
2018-02-04 20:50:59 +00:00
2018-10-14 16:27:28 +00:00
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');