private function composePaket()
 {
     \View::composer(['frontend.app'], function ($view) {
         $pakets = Paket::all();
         $view->with(['pakets' => $pakets]);
     });
 }
示例#2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id, Request $request)
 {
     $paket = Paket::find($id);
     $others = \DB::table('pakets')->whereNotIn('id', [$id])->get();
     $requests = ['_token' => '', 'email' => '', 'paket' => '', 'departure' => '', 'adults' => '', 'children' => ''];
     if ($request->all() != null) {
         $requests = $request->all();
     }
     return view('frontend.paket_detail', compact('paket', 'others', 'requests'));
 }