Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 1674 Revision 1690
Zeile 340... Zeile 340...
340
    } );
340
    } );
341
    Route::get( "/directory/{id}", function ( $id )
341
    Route::get( "/directory/{id}", function ( $id )
342
    {
342
    {
343
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
343
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
344
        $_SESSION["navigation"]["position"] = $dirId;
344
        $_SESSION["navigation"]["position"] = $dirId;
-
 
345
        $subdir = Directory::with( 'medium.medium', 'template.template', 'manufacturer' )->where( "id", $dirId )->firstOrFail();
345
        $dirs = Directory::with( 'medium.medium' )->where( "directory_id", $dirId )->whereIn( 'status', [
346
        $dirs = Directory::with( 'medium.medium','manufacturer' )->where( "directory_id", $dirId )->whereIn( 'status', [
346
            0,
347
            0,
347
            99
348
            99
348
        ] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
349
        ] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
349
        $items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
350
        $items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
350
        $subdir = Directory::with( 'medium.medium', 'template.template', 'manufacturer' )->find( $dirId );
-
 
351
        $subdir["subdirs"] = $dirs->reject( function ( $value )
351
        $subdir["subdirs"] = $dirs->reject( function ( $value )
352
        {
352
        {
353
            return $value->articlemaster == 1;
353
            return $value->articlemaster == 1;
354
        } );
354
        } );
355
        $subdir["items"] = $items;
355
        $subdir["items"] = $items;