Page MenuHomeDevCentral

routes.php
No OneTemporary

routes.php

<?php
use Nasqueron\Notifications\Config\Features;
use Nasqueron\Notifications\Config\Reporting\ConfigReport;
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
return view('welcome');
});
// Allows to external tool to ping your instalation and know if the site is up.
Route::get('/status', function() {
return "ALIVE";
});
// Allows to external tool to check the current configuration.
if (Features::isEnabled('GetConfig')) {
Route::get('/config', function() {
$report = new ConfigReport();
return Response::json($report);
});
}
// Gate controllers
if (Features::isEnabled('Gate')) {
foreach (Config::get('gate.controllers') as $controller) {
$controllerRoute = '/gate/' . $controller . '/';
$controllerClass = "Gate\\${controller}GateController";
Route::get($controllerRoute . '{door?}', "$controllerClass@onGet");
Route::post($controllerRoute . '{door}', "$controllerClass@onPost");
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Jul 29, 13:49 (2 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2831252
Default Alt Text
routes.php (1 KB)

Event Timeline