Example #1
0
 /**
  * Create a new authentication controller instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->middleware('guest', ['except' => 'getLogout']);
     $popup = Popup::where('status', 1)->first();
     view()->share('popup', $popup);
 }
Example #2
0
 public function __construct()
 {
     $popup = Popup::where('status', 1)->first();
     $head_cats = Category::where('type', HEADER_CAT)->where('status', 1)->get();
     $bottom_cats = Category::where('type', BOTTOM_CAT)->where('status', 1)->get();
     $top_navs = Category::where('type', TOP_NAV)->where('status', 1)->get();
     $weeks = Week::all();
     $clans = Clan::all();
     view()->share('popup', $popup);
     view()->share('weeks', $weeks);
     view()->share('head_cats', $head_cats);
     view()->share('bottom_cats', $bottom_cats);
     view()->share('top_navs', $top_navs);
     view()->share('clans', $clans);
 }
Example #3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Popup::truncate();
     $data = [['image_url' => 'images/popups/506x229.jpg', 'status' => 1]];
     Popup::insert($data);
 }
Example #4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $popup = Popup::findOrFail($id);
     $popup->delete();
     return redirect()->route('admin.popups.index')->with(['message' => 'Delete success!']);
 }