Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1089 | Revision 1093 | 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();
1092 lars 16
    $navi = Module::with( 'toool.property' )->get();
17
    \View::share( "navi", $navi );
1087 lars 18
    foreach ( $webRechte as $web_recht )
1081 lars 19
    {
1087 lars 20
        $property = $web_recht->property;
21
        $tool = $property->tool;
22
        $module = $tool->module;
23
        $GLOBALS["web_rechte"][$module->nume][$tool->button_name][$property->interner_name] = $property->Bezeichnung;
1081 lars 24
    }
1088 lars 25
    \View::share( "web_rechte", $GLOBALS["web_rechte"] );
1081 lars 26
    //dump( $web_rechte );
1071 lars 27
 
980 lars 28
    $_SESSION["jquery_js"] = "/js/jquery-1.7.2.min.js";
29
    $_SESSION["jquery_ui_js"] = "/js/jquery-ui-1.8.23.custom.min.js";
30
    $_SESSION["jquery_style"] = "/css/start/jquery-ui.custom.css";
31
 
32
    $_SESSION["jquery_new"] = "/css/start_new/jquery.min.js";
33
    $_SESSION["jquery_ui_new"] = "/css/start_new/jquery-ui.min.js";
34
    $_SESSION["jquery_style_new"] = "/css/start_new/jquery-ui.custom.css";
35
 
36
    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";
37
 
38
    /*if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/jquery-ui.custom.css" ) )
39
    {
40
        $_SESSION["jquery_style"] = "/css/" . $site . "/jquery-ui.custom.css";
41
    }
42
 
43
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/images/loading.gif" ) )
44
    {
45
        $_SESSION["loadingGif"] = "/css/" . $site . "/images/loading.gif";
46
    }
47
 
48
    if ( file_Exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/jquery.min.js" ) )
49
    {
50
        $_SESSION["jquery_new"] = "/css/" . $site . "_new/jquery.min.js";
51
        $_SESSION["jquery_ui_new"] = "/css/" . $site . "_new/jquery-ui.min.js";
52
        $_SESSION["jquery_style_new"] = "/css/" . $site . "_new/jquery-ui.custom.css";
53
    }
54
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/images/loading.gif" ) )
55
    {
56
        $_SESSION["loadingGif"] = "/css/" . $site . "_new/images/loading.gif";
57
    }*/
58
 
1070 lars 59
    Route::get( '/admin/login', [ BackendController::class, 'create' ] )->name( 'login' );
992 lars 60
    Route::post( '/admin/login', [ BackendController::class, 'store' ] );
1067 lars 61
    Route::prefix( 'admin' )->middleware( 'auth:admin' )->group( function ()
964 lars 62
    {
1027 lars 63
        Route::get( '/logout', [ BackendController::class, 'destroy' ] )->name( 'logout' );
1041 lars 64
        Route::view( "/index", "admin/index" );
965 lars 65
    } );