Allow device url by hostname (#11831)

* Allow device url by hostname
/device/hostname
/device/hostname/ports

* slightly different code style
without else ;)
This commit is contained in:
Tony Murray
2020-06-17 15:13:06 -05:00
committed by GitHub
parent 62f850aef9
commit cd9c349297
2 changed files with 9 additions and 7 deletions

View File

@@ -34,8 +34,8 @@ Route::group(['middleware' => ['auth'], 'guard' => 'auth'], function () {
Route::get('authlog', 'UserController@authlog');
Route::get('overview', 'OverviewController@index')->name('overview');
Route::get('/', 'OverviewController@index');
Route::match(['get', 'post'], 'device/{device_id}/{tab?}/{vars?}', 'DeviceController@index')
->name('device')->where(['device_id' => '(device=)?[0-9]+', 'vars' => '.*']);
Route::match(['get', 'post'], 'device/{device}/{tab?}/{vars?}', 'DeviceController@index')
->name('device')->where(['vars' => '.*']);
// Maps
Route::group(['prefix' => 'maps', 'namespace' => 'Maps'], function () {