Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 1475 Revision 1476
Zeile 324... Zeile 324...
324
        return view( 'basket' );
324
        return view( 'basket' );
325
    } );
325
    } );
326
    Route::get( "/directory/{id}", function ( $id )
326
    Route::get( "/directory/{id}", function ( $id )
327
    {
327
    {
328
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
328
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
329
        $dirs = cache()->remember( 'subdirs_' . $dirId, 86400, function ( $dirId )
-
 
330
        {
-
 
331
            return Directory::with( 'medium.medium' )->where( "directory_id", $dirId )->whereIn( 'status', [
329
        $dirs = Directory::with( 'medium.medium' )->where( "directory_id", $dirId )->whereIn( 'status', [
332
                0,
330
            0,
333
                99
331
            99
334
            ] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
332
        ] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
335
 
-
 
336
        } );
-
 
337
        $items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
333
        $items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
338
        $subdir = Directory::with( 'medium.medium', 'template.template' )->find( $dirId );
334
        $subdir = Directory::with( 'medium.medium', 'template.template' )->find( $dirId );
339
        $subdir["subdirs"] = $dirs;
335
        $subdir["subdirs"] = $dirs;
340
        $subdir["items"] = $items;
336
        $subdir["items"] = $items;
341
        $template = 'subdir';
337
        $template = 'subdir';