Ejemplo n.º 1
0
 public function viewAll()
 {
     if (Session::has('in') && !strcmp(Session::get('in'), 'gautepJ9')) {
         return View::make('events.all_events')->with('events', Events::all());
     }
     return Redirect::to('admin/login')->with('isErr', true)->with('msg', 'You need to login first.');
 }
 public function evReg()
 {
     if (Session::has('sense')) {
         return View::make('eventsReg')->with('title', 'Member')->with('events', Events::all())->with('college', CollDetails::find(Session::get('sense')[1]));
     }
     return Redirect::to('reg');
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of events
  *
  * @return Response
  */
 public function index()
 {
     $events = Events::all();
     if (!$events) {
         return Response::json(['error' => true, 'message' => 'No Events added yet'], 400);
     }
     return Response::json(['error' => false, 'data' => $events->toArray()], 200);
 }
Ejemplo n.º 4
0
 public function getLoadevents()
 {
     $data = Events::all();
     echo json_encode($data);
 }
Ejemplo n.º 5
0
 public function events()
 {
     return View::make('events')->with('title', 'Events')->with('link', 'events')->with('events', Events::all());
 }