Example #1
0
 public function cekKelulusan(Request $request)
 {
     $this->validate($request, ['email' => 'required|email']);
     $email = $request->input('email');
     $registrant = Registrant::where('email', $email)->first();
     if ($registrant->kelulusan == 1) {
         $message = "Selamat Anda Dinyatakan LULUS Seleksi Nasional BPB 2016";
     } else {
         $message = "Maaf, anda belum lulus";
     }
     return view('registration.lulus', compact('registrant', 'message'));
 }
Example #2
0
 /**
  * Define your route model bindings, pattern filters, etc.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function boot(Router $router)
 {
     parent::boot($router);
     $router->bind('articles', function ($slug) {
         return \Route::currentRouteName() == "articles.edit" ? \App\Article::findOrFail($slug) : \App\Article::published()->findOrFail($slug);
     });
     $router->bind('news', function ($id) {
         return \Route::currentRouteName() == "news.edit" ? \App\News::findOrFail($id) : \App\News::published()->findOrFail($id);
     });
     $router->bind('tags', function ($name) {
         return \App\Tag::where('name', $name)->firstOrFail();
     });
     $router->bind('users', function ($id) {
         return \App\User::where('id', $id)->firstOrFail();
     });
     $router->bind('messages', function ($id) {
         return \App\Message::where('id', $id)->firstOrFail();
     });
     $router->bind('registrants', function ($id) {
         return \App\Registrant::where('id', $id)->firstOrFail();
     });
     $router->model('image', Image::class);
 }
Example #3
0
 public function registrants()
 {
     $registrants = Registrant::latest()->paginate(10);
     return view('admin.registrants', compact('registrants'));
 }