Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1088 | Revision 1092 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
964 lars 1
<?php
2
 
992 lars 3
    use App\Http\Controllers\BackendController;
1071 lars 4
    use App\Models\Web;
1076 lars 5
    use App\Models\WebProperty;
964 lars 6
    use Illuminate\Support\Facades\Route;
7
 
1068 lars 8
    /*$bc = new BackendController();
1061 lars 9
    $user_rechte = $bc->getUserRechte();
1068 lars 10
    \View::share( "user_rechte", $user_rechte );*/
1061 lars 11
 
1071 lars 12
    $w = new Web();
13
    $GLOBALS["web"] = $w->where( "domain", "=", env( 'shop' ) )->first();
14
    \View::share( "web", $GLOBALS["web"] );
1087 lars 15
    $webRechte = WebProperty::with( [ "property", "property.tool", "property.tool.module" ] )->where( "web_id", "=", $GLOBALS["web"]->ID )->get();
1089 lars 16
    \View::share( "navi", $webRechte );
1087 lars 17
    foreach ( $webRechte as $web_recht )
1081 lars 18
    {
1087 lars 19
        $property = $web_recht->property;
20
        $tool = $property->tool;
21
        $module = $tool->module;
22
        $GLOBALS["web_rechte"][$module->nume][$tool->button_name][$property->interner_name] = $property->Bezeichnung;
1081 lars 23
    }
1088 lars 24
    \View::share( "web_rechte", $GLOBALS["web_rechte"] );
1081 lars 25
    //dump( $web_rechte );
1071 lars 26
 
980 lars 27
    $_SESSION["jquery_js"] = "/js/jquery-1.7.2.min.js";
28
    $_SESSION["jquery_ui_js"] = "/js/jquery-ui-1.8.23.custom.min.js";
29
    $_SESSION["jquery_style"] = "/css/start/jquery-ui.custom.css";
30
 
31
    $_SESSION["jquery_new"] = "/css/start_new/jquery.min.js";
32
    $_SESSION["jquery_ui_new"] = "/css/start_new/jquery-ui.min.js";
33
    $_SESSION["jquery_style_new"] = "/css/start_new/jquery-ui.custom.css";
34
 
35
    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";
36
 
37
    /*if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/jquery-ui.custom.css" ) )
38
    {
39
        $_SESSION["jquery_style"] = "/css/" . $site . "/jquery-ui.custom.css";
40
    }
41
 
42
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/images/loading.gif" ) )
43
    {
44
        $_SESSION["loadingGif"] = "/css/" . $site . "/images/loading.gif";
45
    }
46
 
47
    if ( file_Exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/jquery.min.js" ) )
48
    {
49
        $_SESSION["jquery_new"] = "/css/" . $site . "_new/jquery.min.js";
50
        $_SESSION["jquery_ui_new"] = "/css/" . $site . "_new/jquery-ui.min.js";
51
        $_SESSION["jquery_style_new"] = "/css/" . $site . "_new/jquery-ui.custom.css";
52
    }
53
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/images/loading.gif" ) )
54
    {
55
        $_SESSION["loadingGif"] = "/css/" . $site . "_new/images/loading.gif";
56
    }*/
57
 
1070 lars 58
    Route::get( '/admin/login', [ BackendController::class, 'create' ] )->name( 'login' );
992 lars 59
    Route::post( '/admin/login', [ BackendController::class, 'store' ] );
1067 lars 60
    Route::prefix( 'admin' )->middleware( 'auth:admin' )->group( function ()
964 lars 61
    {
1027 lars 62
        Route::get( '/logout', [ BackendController::class, 'destroy' ] )->name( 'logout' );
1041 lars 63
        Route::view( "/index", "admin/index" );
965 lars 64
    } );