Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1077 | Revision 1079 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

    use App\Http\Controllers\BackendController;
    use App\Models\Web;
    use App\Models\WebProperty;
    use Illuminate\Support\Facades\Route;

    /*$bc = new BackendController();
    $user_rechte = $bc->getUserRechte();
    \View::share( "user_rechte", $user_rechte );*/

    $w = new Web();
    $GLOBALS["web"] = $w->where( "domain", "=", env( 'shop' ) )->first();
    \View::share( "web", $GLOBALS["web"] );
    $web_rechte = WebProperty::where( "web_id", "=", $GLOBALS["web"]->ID );
    dump( $GLOBALS["web"] );

    $_SESSION["jquery_js"] = "/js/jquery-1.7.2.min.js";
    $_SESSION["jquery_ui_js"] = "/js/jquery-ui-1.8.23.custom.min.js";
    $_SESSION["jquery_style"] = "/css/start/jquery-ui.custom.css";

    $_SESSION["jquery_new"] = "/css/start_new/jquery.min.js";
    $_SESSION["jquery_ui_new"] = "/css/start_new/jquery-ui.min.js";
    $_SESSION["jquery_style_new"] = "/css/start_new/jquery-ui.custom.css";

    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";

    /*if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/jquery-ui.custom.css" ) )
    {
        $_SESSION["jquery_style"] = "/css/" . $site . "/jquery-ui.custom.css";
    }

    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/images/loading.gif" ) )
    {
        $_SESSION["loadingGif"] = "/css/" . $site . "/images/loading.gif";
    }

    if ( file_Exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/jquery.min.js" ) )
    {
        $_SESSION["jquery_new"] = "/css/" . $site . "_new/jquery.min.js";
        $_SESSION["jquery_ui_new"] = "/css/" . $site . "_new/jquery-ui.min.js";
        $_SESSION["jquery_style_new"] = "/css/" . $site . "_new/jquery-ui.custom.css";
    }
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/images/loading.gif" ) )
    {
        $_SESSION["loadingGif"] = "/css/" . $site . "_new/images/loading.gif";
    }*/

    Route::get( '/admin/login', [ BackendController::class, 'create' ] )->name( 'login' );
    Route::post( '/admin/login', [ BackendController::class, 'store' ] );
    Route::prefix( 'admin' )->middleware( 'auth:admin' )->group( function ()
    {
        Route::get( '/logout', [ BackendController::class, 'destroy' ] )->name( 'logout' );
        Route::view( "/index", "admin/index" );
    } );