コード例 #1
0
ファイル: userController.php プロジェクト: aaffio/guide
 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'));
     }
 }
コード例 #2
0
ファイル: tripsController.php プロジェクト: aaffio/guide
 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');
     }
 }