Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 342 | Revision 344 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 342 Revision 343
Zeile 25... Zeile 25...
25
    $langstrings = DB::select( $sql );
25
    $langstrings = DB::select( $sql );
26
    foreach ( $langstrings as $langstring )
26
    foreach ( $langstrings as $langstring )
27
    {
27
    {
28
        $GLOBALS[ "langstrings" ][ $langstring->page_id ][ $langstring->id ] = $langstring->string;
28
        $GLOBALS[ "langstrings" ][ $langstring->page_id ][ $langstring->id ] = $langstring->string;
29
    }
29
    }
30
    \View::assign( 'langstrings', $GLOBALS[ "langstrings" ] );
-
 
31
    function getConfig()
30
    function getConfig()
32
    {
31
    {
33
        define( '__SITE__', env( 'site' ) );
32
        define( '__SITE__', env( 'site' ) );
34
        define( '__SHOP__', env( 'shop' ) );
33
        define( '__SHOP__', env( 'shop' ) );
35
        define( "__CFG_PATH__", "/etc/shop_configs/" . __SITE__ . "/" . __SHOP__ );
34
        define( "__CFG_PATH__", "/etc/shop_configs/" . __SITE__ . "/" . __SHOP__ );
Zeile 130... Zeile 129...
130
        $subdir[ "items" ] = $items;
129
        $subdir[ "items" ] = $items;
131
        return view( 'subdir', [
130
        return view( 'subdir', [
132
            "subdir" => $subdir,
131
            "subdir" => $subdir,
133
            "nav"    => $GLOBALS[ "menu" ],
132
            "nav"    => $GLOBALS[ "menu" ],
134
            "ini"    => $GLOBALS[ "INI" ]
133
            "ini"    => $GLOBALS[ "INI" ]
-
 
134
            "langstrings" => $GLOBALS[ "langstrings" ],
135
        ] );
135
        ] );
136
    } );
136
    } );
137
    Route::get( "{item:slug}.html", function ( Item $item )
137
    Route::get( "{item:slug}.html", function ( Item $item )
138
    {
138
    {
139
        $item->load( 'price', 'medium.medium' );
139
        $item->load( 'price', 'medium.medium' );
140
        return view( 'item', [
140
        return view( 'item', [
141
            "item" => $item,
141
            "item" => $item,
142
            "nav"  => $GLOBALS[ "menu" ],
142
            "nav"  => $GLOBALS[ "menu" ],
143
            "ini"  => $GLOBALS[ "INI" ]
143
            "ini"  => $GLOBALS[ "INI" ]
-
 
144
            "langstrings" => $GLOBALS[ "langstrings" ],
144
        ] );
145
        ] );
145
    } );
146
    } );
146
    Route::get( '/', function ()
147
    Route::get( '/', function ()
147
    {
148
    {
148
        $aktion = Action::with( 'medium.medium' )->get();
149
        $aktion = Action::with( 'medium.medium' )->get();
149
        return view( 'startpage', [
150
        return view( 'startpage', [
150
            "pagetype" => "Startseite",
151
            "pagetype"    => "Startseite",
151
            "aktion"   => $aktion,
152
            "aktion"      => $aktion,
152
            "nav"      => $GLOBALS[ "menu" ],
153
            "nav"         => $GLOBALS[ "menu" ],
153
            "ini"      => $GLOBALS[ "INI" ]
154
            "ini"         => $GLOBALS[ "INI" ],
-
 
155
            "langstrings" => $GLOBALS[ "langstrings" ],
154
        ] );
156
        ] );
155
    } );
157
    } );