2020-12-31 16:16:52 +01:00
|
|
|
<?php
|
|
|
|
|
2021-02-19 11:54:03 +01:00
|
|
|
use App\Http\Controllers\ConfigurationController;
|
2021-01-04 19:04:41 +01:00
|
|
|
use App\Http\Controllers\InfoController;
|
2021-02-19 14:39:39 +01:00
|
|
|
use App\Http\Controllers\InitializationController;
|
2021-01-04 11:21:16 +01:00
|
|
|
use App\Http\Controllers\Test;
|
2020-12-31 16:16:52 +01:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-02-19 11:54:03 +01:00
|
|
|
// Percorsi di autenticazione e gestione utenza
|
|
|
|
require __DIR__.'/auth.php';
|
|
|
|
|
2021-02-19 14:39:39 +01:00
|
|
|
// Redirect predefinito a seguito del login
|
|
|
|
Route::get('/', function (){
|
|
|
|
$module = module('Dashboard');
|
|
|
|
|
|
|
|
return redirect('controller.php?id_module='.$module->id);
|
|
|
|
})
|
|
|
|
->middleware('auth');
|
|
|
|
|
2021-02-19 11:54:03 +01:00
|
|
|
// Sezione di configurazione
|
|
|
|
Route::get('/config', [ConfigurationController::class, 'index'])
|
|
|
|
->name('configuration');
|
|
|
|
Route::get('/config-test', [ConfigurationController::class, 'test'])
|
|
|
|
->name('configuration-test');
|
|
|
|
Route::post('/config', [ConfigurationController::class, 'save'])
|
|
|
|
->name('configuration-save');
|
2021-01-04 11:21:16 +01:00
|
|
|
|
2021-02-19 14:39:39 +01:00
|
|
|
// Inizializzazione del gestionale
|
|
|
|
Route::get('/init', [InitializationController::class, 'index'])
|
|
|
|
->name('initialization');
|
|
|
|
Route::post('/init', [InitializationController::class, 'save'])
|
|
|
|
->name('initialization-save');
|
|
|
|
|
2021-01-04 11:21:16 +01:00
|
|
|
// Messaggi flash
|
|
|
|
Route::get('/messages', [Test::class, 'index'])
|
|
|
|
->name('messages');
|
|
|
|
|
2021-01-04 19:04:41 +01:00
|
|
|
// Operazioni Ajax
|
|
|
|
Route::prefix('ajax')->group(function () {
|
|
|
|
Route::get('/select', [Test::class, 'index'])
|
|
|
|
->name('ajax-select');
|
|
|
|
Route::get('/complete', [Test::class, 'index'])
|
|
|
|
->name('ajax-complete');
|
|
|
|
Route::get('/search', [Test::class, 'index'])
|
|
|
|
->name('ajax-search');
|
|
|
|
|
|
|
|
// Sessioni
|
|
|
|
Route::get('/session/', [Test::class, 'index'])
|
|
|
|
->name('ajax-session');
|
|
|
|
Route::get('/session-array/', [Test::class, 'index'])
|
|
|
|
->name('ajax-session-array');
|
|
|
|
|
|
|
|
// Dataload
|
|
|
|
Route::get('/dataload/{module_id}/{reference_id?}', [Test::class, 'index'])
|
|
|
|
->where('module_id', '[0-9]+')
|
|
|
|
->where('reference_id', '[0-9]+')
|
|
|
|
->name('ajax-dataload');
|
|
|
|
});
|
|
|
|
|
2021-01-04 11:21:16 +01:00
|
|
|
// Hooks
|
|
|
|
Route::prefix('hook')->group(function () {
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/list', [Test::class, 'index'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('hooks');
|
|
|
|
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/lock/{hook_id}', [Test::class, 'index'])
|
|
|
|
->where('hook_id', '[0-9]+')
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('hook-lock');
|
|
|
|
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/execute/{hook_id}/{token}', [Test::class, 'index'])
|
|
|
|
->where('hook_id', '[0-9]+')
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('hook-execute');
|
|
|
|
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/response/{hook_id}', [Test::class, 'index'])
|
|
|
|
->where('hook_id', '[0-9]+')
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('hook-response');
|
|
|
|
});
|
|
|
|
|
|
|
|
// Informazioni su OpenSTAManager
|
2021-02-19 11:54:03 +01:00
|
|
|
Route::get('/info', [InfoController::class, 'info'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('info');
|
|
|
|
|
|
|
|
// Segnalazione bug
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/bug', [Test::class, 'index'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('bug');
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::post('/bug', [Test::class, 'index']);
|
2021-01-04 11:21:16 +01:00
|
|
|
|
|
|
|
// Log di accesso
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/logs', [Test::class, 'index'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('logs');
|
|
|
|
|
|
|
|
// Informazioni sull'utente
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/user', [Test::class, 'index'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('user');
|
|
|
|
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::get('/password', [Test::class, 'index'])
|
2021-01-04 11:21:16 +01:00
|
|
|
->name('user-password');
|
2021-01-04 19:04:41 +01:00
|
|
|
Route::post('/password', [Test::class, 'index']);
|