mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update to Laravel 5.7 (PHP 7.3 support) (#9800)
* Move assets to 5.7 location * Add 5.7 SVGs * add cache data dir * update QUEUE_DRIVER -> QUEUE_CONNECTION * Update trusted proxy config * update composer.json * 5.5 command loading * @php and @endphp can't be inline * Laravel 5.6 logging, Nice! * Update blade directives * improved redirects * remove unneeded service providers * Improved debugbar loading * no need to emulate renderable exceptions anymore * merge updated 5.7 files (WIP) * Enable CSRF * database_path() call causes issue in init.php * fix old testcase name * generic phpunit 7 fixes * add missed file_get_contents Keep migrations table content * fix duplicate key * Drop old php versions from travis-ci * remove hhvm * fix code climate message * remove use of deprecated function assertInternalType * Disable CSRF, we'll enable it separately. All forms need to be updated to work. * Update document references
This commit is contained in:
@@ -25,9 +25,7 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
|
||||
Route::get('locations', 'LocationController@index');
|
||||
|
||||
// old route redirects
|
||||
Route::get('poll-log', function () {
|
||||
return redirect('pollers/tab=log/');
|
||||
});
|
||||
Route::permanentRedirect('poll-log', 'pollers/tab=log/');
|
||||
|
||||
// Two Factor Auth
|
||||
Route::get('2fa', 'TwoFactorController@showTwoFactorForm')->name('2fa.form');
|
||||
@@ -105,29 +103,10 @@ Route::group(['middleware' => ['auth', '2fa'], 'guard' => 'auth'], function () {
|
||||
});
|
||||
});
|
||||
|
||||
// Debugbar routes need to be here because of catch-all
|
||||
if (config('app.env') !== 'production' && config('app.debug') && config('debugbar.enabled') !== false) {
|
||||
Route::get('/_debugbar/assets/stylesheets', [
|
||||
'as' => 'debugbar-css',
|
||||
'uses' => '\Barryvdh\Debugbar\Controllers\AssetController@css'
|
||||
]);
|
||||
|
||||
Route::get('/_debugbar/assets/javascript', [
|
||||
'as' => 'debugbar-js',
|
||||
'uses' => '\Barryvdh\Debugbar\Controllers\AssetController@js'
|
||||
]);
|
||||
|
||||
Route::get('/_debugbar/open', [
|
||||
'as' => 'debugbar-open',
|
||||
'uses' => '\Barryvdh\Debugbar\Controllers\OpenController@handler'
|
||||
]);
|
||||
}
|
||||
|
||||
// demo helper
|
||||
Route::get('demo', function () {
|
||||
return redirect('/');
|
||||
});
|
||||
Route::permanentRedirect('demo', '/');
|
||||
|
||||
// Legacy routes
|
||||
Route::any('/{path?}', 'LegacyController@index')->where('path', '.*');
|
||||
Route::any('/{path?}', 'LegacyController@index')
|
||||
->where('path', '^((?!_debugbar).)*');
|
||||
});
|
||||
|
Reference in New Issue
Block a user