Esempio n. 1
0
 public function index()
 {
     if (Auth::guest() || Auth::user()->user_level == 1) {
         return view('welcome');
     } else {
         $kategori_tr = Kategori_trip::all();
         $ngetrip = trip::where('nama_provinsi', Auth::user()->state)->where('status', 'acc')->get();
         return view('welcome')->with(compact('kategori_tr'))->with(compact('ngetrip'));
     }
 }
Esempio n. 2
0
 public function mypostTrip()
 {
     if (Auth::guest() || Auth::user()->user_level == 1) {
         return view('errors.404')->with('title', '404-Page not found');
     } else {
         $kategori_tr = kategori_trip::all();
         $ngetrip = trip::where('nama_provinsi', Auth::user()->state)->where('status', 'acc')->orderBy('id', 'DESC')->get();
         $myTrips = trip::where('createdBy', Auth::user()->id)->get();
         trip_gallery::all();
         return view('guider.posttrips')->with(compact('kategori_tr'))->with(compact('ngetrip'))->with(compact('myTrips'))->with('title', 'All Trip');
     }
 }