middleware(['auth', 'verified', '2fa']); } /** * Show the application dashboard. * * @param $attraction_id * @param $pin * @return \Illuminate\Contracts\Support\Renderable */ public function index($attraction_id, $pin) { if(!preg_match('/^([0-9]){9}$/', $pin)) return Redirect::route('status'); $data = DB::table('attraction')->select('name')->where('id', '=', $attraction_id)->first(); if(empty($data)) return Redirect::route('status'); return view('control')->with([ 'attraction_id' => $attraction_id, 'attraction_name' => MinecraftColor::stripColor( $data->name), 'pin' => $pin ]); } }