app/Http/Controllers/Laundry/LaundriesController.php
/**
     * Display a listing of the resource.
     *
     * @param App\Laundry
     */
Display a listing of the resource.
@param App\Laundry
Display a listing of the resource . @param App \ Laundry
public function orders(Laundry $laundry){
        $orders  = $laundry->branches->map(function($branch ){
                                        return $branch->orders;
                                    })->collapse();
        return view('partner.order.index')->with([
            'orders'=>$orders,
            ]);
    }
public function orders ( Laundry $ laundry ) { $ orders = $ laundry -> branches -> map ( function ( $ branch ) { return $ branch -> orders ; } ) -> collapse ( ) ; return view ( 'partner.order.index' ) -> with ( [ 'orders' => $ orders , ] ) ; }
Display a listing of the resource.
Display a listing of the resource .