public function store(Request $request) { $post = $request->all(); if ($request != " ") { $atsauksme = new Events(); $atsauksme->event = $post['event']; $atsauksme->kad = $post['kad']; $atsauksme->kur = $post['kur']; $atsauksme->save(); return redirect('pasakumi'); } }
public function run() { // DB::table('events')->delete(); Events::create(array('id' => 2, 'event' => 'muzicēsim līdz pusnaktij.', 'kad' => '2016-02-20', 'kur' => ' Folklubā "Ala" no 21:00', 'created_at' => '2016-01-17 14:57:51', 'updated_at' => '2016-01-17 14:57:51')); Events::create(array('id' => 3, 'event' => ' svinēsim Meteņus visas dienas garumā.', 'kad' => '2016-02-28', 'kur' => 'Brīvdabas muzejā ', 'created_at' => '2016-01-17 14:57:51', 'updated_at' => '2016-01-17 14:57:51')); Events::create(array('id' => 4, 'event' => 'rādīsim savas prasmes 19:00.', 'kad' => '2016-04-19', 'kur' => 'Kokneses ziņģē, Kokneses kultūras namā ', 'created_at' => '2016-01-17 14:57:51', 'updated_at' => '2016-01-17 14:57:51')); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function tampil($id) { $data = array(); $event = Events::where('id', $id)->first(); $events = Events::whereNotIn('id', array($id))->take(3)->get(); $data = array('event' => $event, 'events' => $events); return view('pages.seeevent', $data); }
public function delete(Request $request) { if (!ACL::hasPermission('events', 'delete')) { return redirect(route('events'))->withErrors(['Você não pode deletar Eventos.']); } Events::find($request->get('eventsId'))->delete(); $success = "Evento excluído com sucesso."; return redirect(route('events'))->with(compact('success')); }
/** * Show the index view. * * @return index */ public function index() { $directions = App\Directions::all(); // $events = App\Events::with('albums')->get(); $events = App\Events::all(); $teachers = App\Teachers::all(); $groups = App\Groups::all(); return view('index', compact('directions', 'events', 'teachers', 'groups')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $allUserPosts = Posts::where('user_id', \Auth::user()->id)->orderBy('created_at', 'DESC')->get(); // $UAI = UserAdditionalInfo::findOrFail($UAI_id); // $userInfo = UserAdditionalInfo::where('user_id', \Auth::user()->id)->first(); $userInfo = \Auth::user(); $allEvents = Events::orderBy('created_at', 'DESC')->take(2)->get(); $allUserPhotos = PhotoMapImageUploader::where('userId', \Auth::user()->id)->orderBy('photoMapId', 'DESC')->take(6)->get(); return view('profilePage.index', compact('allUserPosts', 'userInfo', 'allEvents', 'allUserPhotos')); }
public function deleteEvent($deleteEventId) { // return('i ma deleting event'); //$deleteEvent = Events::where('event_id', $deleteEventId)->firstOrFail(); $deleteEvent = Events::find($deleteEventId); //return $deleteEvent->eventImage; //delete the image associative with the event \File::Delete('img/Event/' . $deleteEvent->eventImage); $deleteEvent->delete(); return redirect('events'); }
public function index(Request $request) { $page = 'eventos'; $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json"); $pages = Pages::where('slug', '=', $page)->first(); $type = 0; if (!empty($request->type) and $request->type == "internacionais") { $type = 1; } $events = Events::orderBy('date', 'desc')->where('type', '=', $type)->paginate(5); return view('website.events.index')->with(compact('page', 'pages', 'websiteSettings', 'request', 'events')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $allPost = Posts::orderBy('created_at', 'DESC')->get(); //getting all the post from post database table $userInfo = \Auth::user(); $allEvents = Events::orderBy('created_at', 'DESC')->take(2)->get(); $allUserPhotos = PhotoMapImageUploader::orderBy('photoMapId', 'DESC')->take(6)->get(); // $postId = $allPost->id; // $TotalComments = Comments::where('on_post', '5')->count(); // dd($TotalComments); return view('home.index', compact('allPost', 'userInfo', 'allEvents', 'allUserPhotos')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { $data = array(); $search = $request->input('search'); $schools = Schools::where('nama_sekolah', 'like', '%' . $search . '%')->get(); $articles = Articles::where('title', 'like', '%' . $search . '%')->where('category', 'news')->get(); $activities = Articles::where('title', 'like', '%' . $search . '%')->where('category', 'activity')->get(); $events = Events::where('title', 'like', '%' . $search . '%')->get(); $total = $schools->count() + $articles->count() + $activities->count() + $events->count(); $data = array('schools' => $schools, 'articles' => $articles, 'activities' => $activities, 'events' => $events, 'search' => $search, 'total' => $total); return view('pages.pencarian', $data); }
public function userEvents(Request $request) { $user = User::where('remember_token', $request->token)->first(); $events = Events::all(); $user_events = []; foreach ($user->registered as $event) { array_push($user_events, $event->id); } $output = []; foreach ($events as $event) { if (!in_array($event->id, $user_events)) { array_push($output, $event); } } return Response::json(["status" => "OK", "response" => User::where('remember_token', $request->token)->with('registered')->with('events')->first(), "not_registered" => $output], 200); }
public function get_events($id = null) { if (\Auth::check()) { $accessor = Session::get('email'); $user = User::where('email', $accessor)->first(); if ($id == null) { $id = Session::get('email'); } if ($user->priviliges == 1 || $accessor == $id) { $events = Events::where('society_email', $id)->pluck('event_id')->toArray(); $details = []; foreach ($events as $value) { $name = EventDetails::where('event_id', $value)->pluck('event_name')->first(); array_push($details, ['id' => $value, 'name' => $name]); } return $details; } return 0; } }
public function vehicles() { $cars_on = Events::select(["UnitId", DB::raw('count("Value")')])->where("Port", 'Ignition')->where("Value", 1)->groupBy("UnitId")->get()->toArray(); $cars_off = Events::select(["UnitId", DB::raw('count("Value")')])->where("Port", 'Ignition')->where("Value", 0)->groupBy("UnitId")->get()->toArray(); $cars_speed = Positions::select(["UnitId", DB::raw('count("Speed") as total'), DB::raw('sum("Speed") as sum')])->groupBy("UnitId")->get()->toArray(); for ($i = 0; $i < count($cars_on); $i++) { $cars_on[$i]['averageSpeed'] = "Not available"; $cars_on[$i]['count_two'] = 0; foreach ($cars_off as $car_off) { if ($cars_on[$i]['UnitId'] == $car_off['UnitId']) { $cars_on[$i]['count_two'] = $car_off['count']; break; } } } for ($i = 0; $i < count($cars_speed); $i++) { $cars_speed[$i]['averageSpeed'] = floor($cars_speed[$i]['sum'] / $cars_speed[$i]['total']); $cars_speed[$i]['count_two'] = 0; $cars_speed[$i]['count'] = 0; } foreach ($cars_speed as $car_speed) { $add_new = true; for ($i = 0; $i < count($cars_on); $i++) { if ($cars_on[$i]['UnitId'] == $car_speed['UnitId']) { $cars_on[$i]['averageSpeed'] = $car_speed['averageSpeed']; $add_new = false; break; } } if ($add_new) { array_push($cars_on, $car_speed); } } for ($i = 0; $i < count($cars_on); $i++) { $cars_on[$i]['failedStarts'] = $cars_on[$i]['count'] - $cars_on[$i]['count_two']; } return view('pages.vehicles')->with('cars', $cars_on); }
/** * Run the database seeds. * * @return void */ public function run() { Model::unguard(); Events::create(['user_id' => 3, 'location' => 'Jakarta, Indonesia', 'title' => 'Seminar Fotografi Travelling “Nusantara Dibalik Lensa Kamera”', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 8, 12, 2016)), 'description' => 'Untuk menutup bulan September 2015, Jakarta 32 Celcius bekerja sama dengan Psychology Summit Universitas Indonesia 2015 untuk menyelenggarakan Roadshow Art on the Spot episode 11 di lingkungan kampus Depok. Acara tersebut merupakan rangkaian dari pembukaan Jakarta Biennale 2015 yang diselenggarakan mulai Agustus—Oktober 2015. Roadshow Art on the Spot mengajak seniman-seniman Indonesia untuk mengadakan kegiatan bersama warga atau komunitas setempat. Dengan mengusung tema “Hidup Itu Seni”, penyelenggaraan roadshow tersebut dapat berupa lokakarya, kelas, atau respons seniman terhadap lingkungan lewat karya seni. Dalam Roadshow Art on the Spot episode 11 tersebut, Jakarta 32 Celcius mengajak seniman The Popo untuk membuka kelas menggambar di Perpustakaan Universitas Indonesia pada tanggal 30 September 2015. Kelas yang diberikan The Popo dalam Roadshow Art on the Spot episode 11 berupa kelas gambar kreatif. Materi yang diberikan dalam kelas tersebut diambil dari buku berjudul Bahagia yang ditulis oleh The Popo dan dirilis pada tahun 2014. Ia mengajak peserta untuk menggambarkan kebaikan yang dapat ditemukan sehari-hari dengan lebih kreatif. Tema “Hidup Itu Seni” sengaja dijadikan tema besar Jakarta Biennale 2015 karena hidup dan seni dianggap sebagai dua hal yang tidak dapat dipisahkan. Selain The Popo, seniman yang ikut turun dalam Roadshow Art on the Spot episode lainnya adalah Ika Vantiani, Jeany; fotografer Anton Ismael; ilustrator Lala Bohang dan Jayu Julie; seniman video Gelar Agryano; komikus Reza Mustar alias Komikazer; seniman kertas dan pesulap Kiswinar; kelompok grafiti Gardu House; dan kelompok performans PADJAK.']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Kompetisi Musik dan Seminar bagi Anak Spesial di LSPR', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 28, 3, 2016)), 'description' => 'Jakarta, 28 - 29 Maret 2015. Manusia dapat berkomunikasi melalui musik, inilah yang dibuktikan oleh anak-anak yang memiliki kesulitan dalam berkomunikasi, autisme, yang mengikuti kompetisi musik yang diadakan oleh London School of Public Relations (LSPR)– Jakarta melalui London School Centre for Autism Awareness (LSCAA) dalam rangka memperingati World Autism Awareness Day yang jatuh pada tanggal 2 April setiap tahunnya. Sebanyak 28 peserta bersaing dalam 4 kategori yang berbeda yaitu Piano, Drum, Gitar, dan Band. Mereka akan mengekspresikan talenta mereka melalui acara yang diberi nama Autism Awareness Festival 7th pada 28 Maret 2015 bertempat di Kampus B, LSPR – Jakarta, Jl. K.H. Mas Mansyur Kav. 35 Jakarta.']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Liga Merah Maroon 2015 Bersama Membangun Olahraga Indonesia', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 22, 3, 2016)), 'description' => 'Kompetisi olahraga dan seni terbesar di Universitas Bakrie, Liga Merah Maroon 2015, akhirnya sampai di pengujung acara. Rangkaian kegiatan yang dimulai sejak 16 Maret 2015 ini mempertandingkan beberapa cabang olahraga dan seni seperti basket, sepak bola, bulu tangkis, dan tari saman. Guna menutup kemeriahan Liga Merah Maroon 2015, pada 22 Maret 2015 diselenggarakan upacara penutupan yang mengusung tema “Spreading Indonesian Youth Through League.” Tema yang membingkai acara ini memiliki tujuan untuk menyebarkan semangat olahraga kepada setiap anak muda dan memberikan apresiasi kepada para pejuang olahraga di Indonesia. Upacara penutupan diisi dengan bincang inspiratif oleh Sin Kim Lai yang merupakan mantan atlet basket nasional yang pernah mengharumkan Indonesia pada ajang Sea Games 1997 dengan membawa pulang medali perunggu. Dalam acara ini, Sim Kin Lai bercerita mengenai kehidupannya selama menjadi atlet nasional dan dedikasinya terhadap Indonesia hingga saat ini. Bincang inspiratif ini bertujuan agar para generasi muda tidak pernah lelah untuk terus berdedikasi bagi bangsa ini. Dalam acara ini, panitia Liga Merah Maroon Menyumbangkan uang tunai sebesar Rp14.000.000 kepada yayasan olahraga yang digagas oleh Sin Kim Lai, yaitu Pelangi Basketball Club yang berdomisili di Blitar. Pelangi Basketball Club didirikan oleh Sin Kim lai untuk membantu masyarakat yang kurang mampu untuk dapat berprestasi di bidang olahraga basket. Donasi ini diberikan sebagai bentuk apresiasi dan turut membantu mantan olahragawan yang masih berdedikasi khususnya di bidang sekolah olahraga. Donasi ini diharapkan pula dapat mewakili rasa terima kasih dan dukungan dari partisipan Liga Merah Maroon 2015 sekaligus mengembangkan olahraga Indonesia.']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Try Out SBMPTN IPA, IPS, IPC "Get Ready to Shine"', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 23, 12, 2016)), 'description' => 'Try Out SBMPTN IPA, IPS, IPC "Get Ready to Shine" Tanggal : 31 Januari 2016 Tempat : Hall Basket Senayan, Jakarta Informasi lebih lanjut : @trofifebui | www.trofifebui.co.nr']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Sonic Linguistic 2016', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 18, 12, 2016)), 'description' => 'Sonic Linguistic 2016 “Show Your Brain in Science, Link Imagination, Our Language, Sport, Art, and Culture” Tanggal : 17 – 20 Februari 2016 Tempat : MAN Insan Cendekia Serpong, Jl. Cendekia 1 BSD City Sektor XI Tangerang Selatan Informasi lebih lanjut : Akbar : 089673502629 | Ask.fm : @sonlis2016 | Line ID : nildzakheirizzad | Twitter : @sonlis2016 | Email : slpublikasi@gmail.com | Web : soniclinguistic.com']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Agyat Nusa "Gemerlap Nusantara"', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 10, 12, 2016)), 'description' => 'Agyat Nusa "Gemerlap Nusantara" Tanggal : Sabtu, 19 Desember 2015 Tempat : Auditorium Harun Nasution, UIN Syarif Hidayatullah, Jakarta Waktu : 18.30 – Selesai Informasi lebih lanjut : Asih : 0838 9205 6602 / Pin BB : 7EE5E3E5 | Eli : 0896 6402 4044 / Pin BB : 59263DID | Lukluk : 0813 1066 1506 | www.postar.fitk.uinjkt.ac.id | Twitter : @postar_uinjkt | Instagram : postar_uinjkt']); Events::create(['user_id' => 1, 'location' => 'Jakarta, Indonesia', 'title' => 'Tujuh Tujuh Cup “Curious Expedition Reveal the Power of Art”', 'due_date' => date('Y-m-d h:i:sa', mktime(11, 14, 54, 8, 12, 2016)), 'description' => 'SMAN 77 Proudly Present : Tujuh Tujuh Cup “Curious Expedition Reveal the Power of Art” Tanggal : 14 – 19 Desember 2015 Temapt : SMAN 77, Jakarta Informasi lebih lanjut : Riandzaki : 081293405100 / Line ID : riandzakihafiz | Safira : 0816889348 / Line ID : saaf_ | Winnie : 081296963098 / Line ID : winnindya | Twitter : @official77cup | Instagram : official77cup']); }
protected function getEvents() { $events = []; $start = Input::get('from') / 1000; $end = Input::get('to') / 1000; $events = Events::whereBetween('start', [date('Y-m-d', $start), date('Y-m-d', $end)])->whereBetween('end', [date('Y-m-d', $start), date('Y-m-d', $end)]); if (!in_array(Auth::user()->level, [4, 3, 2])) { $events->where('url', '<>', 'on'); } $events = $events->get(); foreach ($events as $e) { $participants = []; if (strpos($e->title, '@@')) { $participants = explode(',', substr($e->title, strpos($e->title, '@@') + 2)); } if (!empty($participants)) { $participants = User::select('id', 'fullname', 'position')->whereIn("id", $participants)->get(); } $events[] = array('id' => $e->id, 'title' => $e->title, 'url' => '#', 'participants' => $participants, 'class' => $e->class, 'start' => strtotime($e->start) . '000', 'end' => strtotime($e->end) . '000'); } echo json_encode(array('success' => 1, 'result' => $events)); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $event = Events::findOrFail($id); $returnType = $event["e_type"]; $event->delete(); return \Redirect::route($returnType)->withMessage('Event was Deleted'); }
public function events() { $events = Events::all(); return response()->json($events); }
public function del_soc($id) { if (\Auth::check()) { $user = User::where('email', Session::get('email'))->first(); if ($user->priviliges == 1) { $soc = User::where('id', $id)->first(); $events = Events::where('society_email', $soc->email)->get(); if ($events) { foreach ($events as $eve) { $event_details = EventDetails::where('event_id', $eve->event_id)->delete(); $eve->delete(); } } } if ($soc->delete()) { return Redirect::route('admin_panel'); } } return Redirect::route('admin_panel'); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $allEvents = Events::orderBy('created_at', 'DESC')->get(); return view('events.index', compact('allEvents')); }
public function delete($tipe, $id) { if ($tipe == 'event') { Events::where('id', $id)->delete(); return redirect('dashboard/admin/events'); } elseif ($tipe == 'article') { Articles::where('id', $id)->delete(); $upload_folder = '/img/article/'; unlink(public_path() . $upload_folder . $id . '.jpg'); return redirect('dashboard/admin/articles'); } elseif ($tipe == 'user') { $role = Users::where('id', $id); Users::where('id', $id)->delete(); if ($role - role == 'sekolah') { Schools::where('user_id', $role->id)->delete(); } return redirect('dashboard/admin/users'); } elseif ($tipe == 'activity') { Articles::where('id', $id)->delete(); return redirect('dashboard/admin/activities'); } }
public function get_soc_mem_details($type, $id) { if (\Auth::check()) { $user = User::where('email', Session::get('email'))->first(); if ($user->priviliges == 1) { $soc = User::where('id', $id)->get()->first(); $members = Members::where('soc_id', $soc['email'])->where('type', $type)->get(); $members = $members->toArray(); foreach ($members as $key => $field) { if ($members[$key]['events'] != '' && $members[$key]['events'] != null && $members[$key]['events'] != 'null') { $x = EventDetails::where('event_id', $members[$key]['events'])->first(); if ($x != '') { $members[$key]['events'] = EventDetails::where('event_id', $members[$key]['events'])->first()->event_name; } else { $members[$key]['events'] = ''; } } } $disp_events = Events::where('society_email', $soc->email)->get()->pluck('event_id'); $disp_event_details = array(); foreach ($disp_events as $disp) { $disp_event_details[] = EventDetails::where('event_id', $disp)->first(); } return \View::make('team_table', array('members' => $members, 'type' => $type, 'disp_events' => $disp_event_details)); } } return Route::back(); }
public function create_event() { if (\Auth::check()) { $user = User::where('email', Session::get('email'))->first(); $data = Input::all(); //dd($data); array_pop($data); $rules = ['event_name' => 'required', 'file' => 'mimes:application/pdf']; $validator = Validator::make($data, $rules); if ($validator->fails()) { return Redirect::route('add_event')->withErrors($validator->errors())->withInput(); } $event = new Events(); $event->society_email = $user->email; if (sizeof(Events::all()) != 0) { $event_count = Events::all()->last()->id + 1; } else { $event_count = 0; } $event->event_id = strtolower(substr($user->society, 0, 4)) . $event_count; $eventdetails = new EventDetails(); $eventdetails->event_id = $event->event_id; $eventdetails->event_name = $data['event_name']; $eventdetails->event_description = json_encode($data['short_des']); $eventdetails->long_des = json_encode($data['long_des']); $eventdetails->rules = json_encode($data['rules']); // rules n long des ke columns banenge // n vo yahan par se vahan jayenge if (Status::first()->add_events == 1) { $data['timing'] = $data['date'] . " " . $data['time']; $data['contact'] = array(array("name" => $data['contact_name1'], "number" => $data['contact_number1']), array("name" => $data['contact_name2'], "number" => $data['contact_number2'])); $data['prize_money'] = array($data['prize_money1'], $data['prize_money2']); if (rtrim($data['timing']) != '' && strpos($data['timing'], 'undefined') === false) { $tv = preg_split('/[- :]/', $data['timing']); $d = mktime($tv[3], $tv[4], 0, $tv[1], $tv[2], $tv[0]); $timestamp = date("Y-m-d h:i:s", $d); $eventdetails->timing = $timestamp; } $eventdetails->contact = json_encode($data['contact']); $eventdetails->prize_money = json_encode($data['prize_money']); $eventdetails->approved = 0; if (Input::file('file') != null && Input::file('file')->isValid()) { $destinationPath = 'uploads'; // upload path $extension = Input::file('file')->getClientOriginalExtension(); // getting image extension $fileName = rand(11111, 99999) . '.' . $extension; // renameing image Input::file('file')->move($destinationPath, $fileName); // uploading file to given path $eventdetails->attachment = $fileName; } } $event->save(); if ($eventdetails->save()) { return Redirect::route('view_event'); } else { Session::flash('success', '0'); return Redirect::back(); } } else { return Redirect::route('root'); } }
public function modEvent() { $user = Auth::user(); $input = Input::get(); $inputf = 'm/d/Y H:i'; if (Input::has('start')) { $start = \DateTime::createFromFormat($inputf, $input['start']); } if (Input::has('end')) { $end = \DateTime::createFromFormat($inputf, $input['end']); } $event = Events::findOrfail($input['id']); if (Input::has('title')) { $event->title = $input['title']; } if (Input::has('desc')) { $event->desc = $input['desc']; } if (Input::has('start')) { $event->start = $start; } if (Input::has('end')) { $event->end = $end; } $event->save(); return response()->json(array('response' => 'ok', 'event' => $event)); }
public function addguest($id, Request $request) { $email = $request->input('guest_email'); $event = Events::find($id); $guest = Guests::where('email', $email, 1)->first(); if ($event && $email) { if (!isset($guest->id)) { $guest = new Guests(); $guest->name = $request->input('guest_name'); $guest->email = $email; $guest->save(); } $guest_pivot = new PivotEventGuest(); $guest_pivot->guest = $guest->id; $guest_pivot->event = $event->id; $guest_pivot->save(); } return redirect()->action('EventsController@show', ['id' => $id]); }
public function vehicles() { $cars_on = Events::select(["UnitId", DB::raw('count("Value")')])->where("Port", 'Ignition')->where("Value", 1)->groupBy("UnitId")->get(); $cars_off = Events::select(["UnitId", DB::raw('count("Value")')])->where("Port", 'Ignition')->where("Value", 0)->groupBy("UnitId")->get(); return view('pages.vehicles')->with('cars_on', $cars_on)->with('cars_off', $cars_off); }
public function root() { $events = Events::all(); $eventdetails = EventDetails::all(); return View::make('zeal', ['events' => $events, 'eventdetails' => $eventdetails]); }
public function deleteevent($id) { Events::where('id', $id)->delete(); $upload_folder = '/img/event/'; unlink(public_path() . $upload_folder . $id . '.jpg'); return redirect('dashboard/organisasi'); }
public function eventDetails(Request $request, $event_id) { return Response::json(["status" => "OK", "response" => Events::with('attendees')->where('id', $event_id)->first()], 200); }
/** * Show the events view. * * @return events */ public function events() { $events = App\Events::with('albums')->get(); return view('inner.events.index', compact('events')); }