コード例 #1
0
ファイル: routes.php プロジェクト: Netping/DKSF_69_system
| 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 Closure to execute when that URI is requested.
|
*/
Route::group(array('before' => 'auth'), function () {
    //ниже идут запросы, требующие авторизованности пользователя
    Route::get('/', function () {
        return View::make("base")->with("currentMenu", "main")->nest("conetent", "intro.index", []);
    });
    Route::get("/main", function () {
        return View::make("base")->with("currentMenu", "main")->nest("conetent", "intro.main", []);
    });
    Route::get("/admin", function () {
        $admin = Admin::first();
        $admin_users = AdminUser::all();
        $admin_access_subnet = AdminAccessSubnet::all();
        $admin_ntp_servers = AdminNtpServer::all();
        // dd($admin);
        return View::make("base")->with("currentMenu", "admin")->nest("conetent", "intro.admin", ["admin" => $admin, "admin_users" => $admin_users, "admin_access_subnet" => $admin_access_subnet, "admin_ntp_servers" => $admin_ntp_servers]);
    });
    Route::post("/admin/save", function () {
        $admin = Admin::first();
        // dd(Input::get("datetime_offset"),$admin);
        $admin->hostname = Input::get("hostname");
        $admin->location = Input::get("location");
        $admin->contacts = Input::get("contacts");
        $admin->access_read = Input::get("access_read");
        $admin->access_write = Input::get("access_write");
        $admin->access_filter = Input::get("access_filter");
        $admin->timezone = Input::get("timezone");