public function dologin() { $rules = array('username' => 'required', 'password' => 'required'); $message = array('required' => 'Data :attribute harus diisi', 'min' => 'Data :attribute minimal diisi :min karakter'); $validator = Validator::make(Input::all(), $rules, $message); if ($validator->fails()) { return Redirect::to('/')->withErrors($validator)->withInput(Input::except('password')); } else { $data = array('username' => Input::get('username'), 'password' => Input::get('password')); if (Auth::attempt($data)) { $data = DB::table('user')->select('user_id', 'level_user', 'username')->where('username', '=', Input::get('username'))->first(); //print_r($data); //echo $data->id_users; Session::put('user_id', $data->user_id); Session::put('level', $data->level_user); Session::put('username', $data->username); //print_r(Session::all()); return Redirect::to("/admin/beranda"); } else { Session::flash('messages', ' <div class="alert alert-danger alert-dismissable" > <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>Peringatan...</strong><br> Username dan password belum terdaftar pada sistem ! </div> '); return Redirect::to('/')->withInput(Input::except('password')); } } }
/** * Call this method to redirect user to login page and initiate * the Web Server OAuth Authentication Flow. * @return void */ public function authenticate($loginURL = null) { if (!isset($loginURL)) { $loginURL = $this->credentials['loginURL']; } $loginURL .= '/services/oauth2/authorize'; $loginURL .= '?response_type=code'; $loginURL .= '&client_id=' . $this->credentials['consumerKey']; $loginURL .= '&redirect_uri=' . urlencode($this->credentials['callbackURI']); if ($this->parameters['display'] != '') { $loginURL .= '&display=' . $this->parameters['display']; } if ($this->parameters['immediate']) { $loginURL .= '&immediate=true'; } if ($this->parameters['state'] != '') { $loginURL .= '&state=' . urlencode($this->parameters['state']); } if ($this->parameters['scope'] != '') { $scope = rawurlencode($this->parameters['scope']); $loginURL .= '&scope=' . $scope; } if ($this->parameters['prompt'] != '') { $prompt = rawurlencode($this->parameters['prompt']); $loginURL .= '&prompt=' . $prompt; } return $this->redirect->to($loginURL); }
public function showForm() { if ($blog = Input::get('blog')) { return Redirect::to('/' . $blog); } $this->layout->content = View::make('main'); }
public function delete() { $error = false; if (Input::has("del-gpId")) { if (CRUtilities::deleteGP(Input::get("del-gpId"))) { return Redirect::to("admin/dashboard/gateway")->with("message", "Gateway Profile has been deleted."); } else { $error = true; } } else { if (Input::has("rem-crId")) { if (CRUtilities::deleteCR(Input::all())) { return Redirect::to("admin/dashboard/gateway")->with("message", "The selected Compute Resource has been successfully removed"); } else { $error = true; } } else { if (Input::has("rem-srId")) { if (CRUtilities::deleteSR(Input::all())) { return Redirect::to("admin/dashboard/gateway")->with("message", "The selected Compute Resource has been successfully removed"); } else { $error = true; } } else { $error = true; } } } if ($error) { return Redirect::to("admin/dashboard/gateway")->with("message", "An error has occurred. Please try again later or report a bug using the link in the Help menu"); } }
public function login($id = null) { $user = $this->user; $this->data['user']['name'] = $user->data()->user; Config::set('html.title', 'Авторизация'); Config::set('html.description.val', 'На этой странице можно залогиниться'); //$user = new User(); $salt = uniqid(); if (!Session::exists(Config::get('session.token_name'))) { Token::generate(); } if (Input::exists()) { if (Token::check(Input::get('token'))) { $validate = new VALIDATE(); $validation = $validate->check($_POST, array('user' => array('required' => true), 'password' => array('required' => true))); if ($validate->passed()) { $remember = Input::get('remember') === 'on' ? true : false; $login = $user->login(Input::get('user'), Input::get('password'), null); if ($login) { Redirect::to('/'); } else { echo '<p>Sorry, logging in failed</p>'; } } else { foreach ($validation->errors() as $error) { //echo $error, '<br/>'; $this->data['validate_errors'][] = $error; } } } } //$this->data['id']=$id; //$this->data['name']=Input::get('name'); $this->view('user/login'); }
public function faqSend() { $question = new Question(); $input = Input::all(); $captcha_string = Input::get('g-recaptcha-response'); $captcha_response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=6LcCwgATAAAAAKaXhPJOGPTBwX-n2-PPLZ7iupKj&response=' . $captcha_string); $captcha_json = json_decode($captcha_response); if ($captcha_json->success) { $rules = ["sujetQuestion" => "required", "mail" => "required|email", "contenuQuestion" => "required"]; $messages = ["required" => ":attribute est requis pour l'envoi d'une question", "email" => "L'adresse email précisée n'est pas valide"]; $validator = Validator::make(Input::all(), $rules, $messages); if ($validator->fails()) { $messages = $validator->messages(); Session::flash('flash_msg', "Certains champs spécifiés sont incorrects."); Session::flash('flash_type', "fail"); return Redirect::to(URL::previous())->withErrors($validator); } else { $question->fill($input)->save(); Session::flash('flash_msg', "Votre question nous est bien parvenue. Nous vous répondrons sous peu."); Session::flash('flash_type', "success"); return Redirect::to(URL::previous()); } } else { Session::flash('flash_msg', "Champ de vérification incorrect ou non coché."); Session::flash('flash_type', "fail"); return Redirect::to(URL::previous()); } }
public function postNueva() { $oferta = new Oferta(); $data = Input::all(); $titulaciones = Input::get('titulaciones'); unset($data['titulaciones']); $data['fecha_caducidad'] = DateSql::changeToSql($data['fecha_caducidad']); //return var_dump($data); $oferta->fill($data); $oferta->save(); if (is_array($titulaciones)) { foreach ($titulaciones as $titulacion) { $oferta->titulaciones()->attach($titulacion); } } /*if (Input::has('titulaciones')) { foreach(Input::get('titulaciones') as $titulacion) { $titulaciones[]=new Titulacion(array('empresa_id'=>Session::get('id_empresa'), 'titulacion'=>$titulacion)); } $oferta->titulaciones()->saveMany($titulaciones); } if (Input::has('funciones_esp')) { foreach(Input::get('funciones_esp') as $funcion) { $funciones[]=new FuncionOferta(array('funcion'=>$funcion)); } $oferta->funciones()->saveMany($funciones); }*/ return Redirect::to('oferta/ficha-oferta/' . $oferta->id . "#requerimientos")->with('ok', "Oferta creada con éxito."); }
public function store() { $lrm = Lrm::getInstance(); $lrm->addRoute(\Input::get('method'), \Input::get('uri'), \Input::get('action')); $lrm->save(); return \Redirect::to("lrm"); }
/** * Display a listing of the resource. * * @return Response */ public function index() { if (Auth::check()) { return Redirect::to('admin/panelAdmin'); } return View::make('admin/login'); }
/** * Show the form for creating a new resource. * * @return Response */ public function save() { $rules = ['firstname' => 'required', 'lastname' => 'required', 'login' => 'required', 'address' => 'required', 'cpassword' => 'required', 'npassword' => 'required', 'cnpassword' => 'required']; $validator = \Validator::make(Input::all(), $rules); if ($validator->fails()) { return Redirect::to('/settings')->withinput(Input::all())->withErrors($validator); } else { if (Input::get('npassword') == Input::get('cnpassword')) { // $u = User::select('*')->where('password',Hash::make(Input::get('cpassword')))->first(); //return Hash::make(Input::get('cpassword')); //if(count($u)>0) { $user = User::find(Input::get('id')); $user->firstname = Input::get('firstname'); $user->lastname = Input::get('lastname'); // $user->login = Input::get('login'); $user->address = Input::get('address'); // $user->email = Input::get('email'); $user->password = Hash::make(Input::get('npassword')); $user->save(); return Redirect::to('/settings')->with('success', 'Settings is changed please relogin the site.'); /*} else { $errorMessages = new Illuminate\Support\MessageBag; $errorMessages->add('notmatch', 'Current Password did not match!'); return Redirect::to('/settings')->withErrors($errorMessages); }*/ } else { $errorMessages = new Illuminate\Support\MessageBag(); $errorMessages->add('notmatch', 'New Password and confirm password did not match!'); return Redirect::to('/settings')->withErrors($errorMessages); } } }
/** * Sends Forgot Password Email * @param string * @return bool */ public static function sendForgotPasswordEmail($email) { try { // Find the user using the user email address $user = Sentry::getUserProvider()->findByLogin($email); // Get the password reset code $resetCode = $user->getResetPasswordCode(); //send this code to your user via email. $name = $user->first_name . ' ' . $user->last_name; $link = (string) url() . '/auth/recoverpassword?password_reset_token=' . $resetCode . '&email=' . $email; $data = array('name' => $name, 'link' => $link); Mail::queue('emails.auth.forgotpassword', $data, function ($message) use($user) { $message->to($user->email)->subject('Forgot Password Assistance'); }); return true; } catch (Cartalyst\Sentry\Users\UserNotFoundException $e) { return Redirect::to('login')->with('message', 'error104'); } catch (Cartalyst\Sentry\Users\UserNotActivatedException $e) { return Redirect::to('login')->with('message', 'error103'); } catch (Cartalyst\Sentry\Users\UserSuspendedException $e) { return Redirect::to('login')->with('message', 'error105'); } catch (Cartalyst\Sentry\Users\UserBannedException $e) { return Redirect::to('login')->with('message', 'error102'); } }
public function duzenleForm($id) { $data = Input::all(); $kural = array('baslik' => 'required|min:3', 'resim' => 'max:1536|required|mimes:jpeg,jpg,bmp,png,gif'); $dogrulama = \Validator::Make($data, $kural); if (!$dogrulama->passes()) { return \Redirect::to('admin/galeriler/duzenle/' . $id)->withErrors($dogrulama)->withInput(); } else { if (Input::hasFile('resim')) { $dosya = Input::file('resim'); $uzanti = $dosya->getClientOriginalExtension(); if (strlen($uzanti) == 3) { $dosyaAdi = substr($dosya->getClientOriginalName(), 0, -4); } else { if (strlen($uzanti) == 4) { $dosyaAdi = substr($dosya->getClientOriginalName(), 0, -5); } } $dosyaAdi = $dosyaAdi . "_" . date('YmdHis') . '.' . $uzanti; $path = base_path('galeriResimler/600x450/' . $dosyaAdi); Image::make($dosya->getRealPath())->resize(600, 450)->save($path); $path = base_path('galeriResimler/defaultSize/' . $dosyaAdi); Image::make($dosya->getRealPath())->save($path); $path = $dosyaAdi; $query = DB::insert('insert into gal_resim values (null,?,?,?)', array($id, $data["baslik"], $path)); return Redirect::back(); } } }
public function loginWithFacebook() { // get data from input $code = Input::get('code'); // get fb service $fb = OAuth::consumer('Facebook'); // check if code is valid // if code is provided get user data and sign in if (!empty($code)) { // This was a callback request from facebook, get the token $token = $fb->requestAccessToken($code); // Send a request with it $result = json_decode($fb->request('/me'), true); $message = 'Your unique facebook user id is: ' . $result['id'] . ' and your name is ' . $result['name']; echo $message . "<br/>"; //Var_dump //display whole array(). dd($result); } else { // get fb authorization $url = $fb->getAuthorizationUri(); // return to facebook login url return Redirect::to((string) $url); } }
/** * Show the form for creating a new resource. * GET /ob/create * * @return Response */ public function create() { $validate = LeaveOB::validate(Input::all()); if ($validate->passes()) { if (Input::get('totalleaves') <= 0.0 or Input::get('totalleaves') === 'NaN') { $message = 'Please select correct date!'; return Redirect::to('applyob')->with('error_message', $message); } else { $lastrow = LeaveOB::orderBy('created_at', 'desc')->first(); } $data = new LeaveOB(); $data->employee_id = Auth::user()->employee_id; if ($lastrow == null) { $data->leave_id = Str::random(8); } else { $data->leave_id = Str::random(8) . $lastrow->id; } $data->days_of_leave = Input::get('totalleaves'); $data->wdays_of_leave = Input::get('totalleave'); $data->date_from = Input::get('date_from'); $data->time_from = Input::get('time_from'); $data->date_to = Input::get('date_to'); $data->time_to = Input::get('time_to'); $data->company = Input::get('company'); $data->address = Input::get('address'); $data->reason = Input::get('reason'); $data->save(); return Redirect::to('applyob')->with('message', 'Your Application for Official Business (OB) is successfully send.Please Check Your Notification box to see if your leave has been approved.'); } else { return Redirect::to('applyob')->withErrors($validate); } }
/** * Display the specified resource. * * @param string $location * @return Response */ public function show() { $location = Input::get('location'); $type = strtolower(Input::get('type')); $wildcardLocation = "%" . $location . "%"; if (Input::has('type')) { $types = array('meeting-room', 'coworking', 'desk'); if (!in_array($type, $types, true)) { return Redirect::to('/')->with('flash_message_404', "Sorry, we don't have that type of space so we brought you back home!"); } $listings = Listing::with('thumbnail')->where('isPublic', '=', 1, "and")->where('space_type', '=', $type)->where('city', 'LIKE', $wildcardLocation)->orWhere('state', 'LIKE', $wildcardLocation)->orWhere('suburb', 'LIKE', $wildcardLocation)->orWhere('country', 'LIKE', $wildcardLocation)->orWhere('postcode', 'LIKE', $wildcardLocation)->get(); } else { $listings = Listing::with('thumbnail')->where('isPublic', '=', 1, "and")->where('space_type', '=', $type)->where('city', 'LIKE', $wildcardLocation)->orWhere('state', 'LIKE', $wildcardLocation)->orWhere('suburb', 'LIKE', $wildcardLocation)->orWhere('country', 'LIKE', $wildcardLocation)->orWhere('postcode', 'LIKE', $wildcardLocation)->get(); } $colNum = Listing::where('city', 'LIKE', $wildcardLocation)->orWhere('state', 'LIKE', $wildcardLocation)->orWhere('suburb', 'LIKE', $wildcardLocation)->orWhere('country', 'LIKE', $wildcardLocation)->where('isPublic', '=', '1')->count(); switch ($colNum) { case 1: $colNum = 12; break; case 2: $colNum = 6; break; case 3: $colNum = 3; break; } $title = ucwords("Search: " . $type . " spaces in " . $location); return View::make('search.results')->with('listings', $listings)->with('title', $title)->with('colNum', $colNum); }
public function archive($publicId) { $branch = Branch::scope($publicId)->firstOrFail(); $branch->delete(); Session::flash('message', trans('texts.archived_branch')); return Redirect::to('company/branches'); }
public function registrarProfesor() { $new_profesor = new Profesor(); $new_profesor->num_empleado = Input::get("num_empleado"); $new_profesor->password = Input::get("password"); $new_profesor->email = Input::get("email"); $new_datos_profesor = new DatosProfesor(); $new_datos_profesor->nombre = Input::get("nombre"); $new_datos_profesor->apellido_paterno = Input::get("apellido_paterno"); $new_datos_profesor->apellido_materno = Input::get("apellido_materno"); $new_datos_profesor->sexo = Input::get("sexo"); $new_datos_profesor->celular = Input::get("celular"); // Pequeño hack. Primero lo ponemos como archivo para validarlo, después le asignamos la ruta real para guardarlo $new_datos_profesor->ruta = Input::file('cv'); if ($new_profesor->validate()) { if ($new_datos_profesor->validate()) { $nombreCV = Input::get("nombre") . "_" . Input::get("apellido_paterno") . "_" . Input::get("apellido_materno") . "_CV.pdf"; //CHECAR PORQUE NO SE CREA EL PUTO CV!!! Input::file('cv')->move("CVs", $nombreCV); $new_datos_profesor->ruta = "/CVs/" . $nombreCV; //Ahora si, guardamos todo después de haberlo validado $new_profesor->save(); $new_datos_profesor->profesor()->associate($new_profesor); // Forzamos Save porque sabemos que no validará ruta como un string, sino como un file $new_datos_profesor->forceSave(); return Redirect::to('/'); } else { return Redirect::route('registro')->withErrors($new_datos_profesor->errors())->withInput(); } } else { $new_datos_profesor->validate(); $erroresValidaciones = array_merge_recursive($new_profesor->errors()->toArray(), $new_datos_profesor->errors()->toArray()); return Redirect::route('registro')->withErrors($erroresValidaciones)->withInput(); } }
function do_save() { $ids = Input::get('ids'); $customer_first_name = Input::get('customer_first_name'); $customer_last_name = Input::get('customer_last_name'); $customer_company = Input::get('customer_company'); $customer_address = Input::get('customer_address'); $customer_town = Input::get('customer_town'); $customer_country = Input::get('customer_country'); $customer_email = Input::get('customer_email'); $customer_phone = Input::get('customer_phone'); $customer_datebirth = Input::get('customer_datebirth'); $customer_password = Input::get('password'); if ($customer_password != "") { $save['customer_password'] = $customer_password; } $save['customer_first_name'] = $customer_first_name; $save['customer_last_name'] = $customer_last_name; $save['customer_company'] = $customer_company; $save['customer_address'] = $customer_address; $save['customer_town'] = $customer_town; $save['customer_country'] = $customer_country; $save['customer_email'] = $customer_email; $save['customer_phone'] = $customer_phone; $save['customer_datebirth'] = $customer_datebirth; $this->customer->edit($ids, $save); Session::flash('notip', '<div class="alert alert-success">Profile telah diupdate</div>'); return Redirect::to('/member/' . $ids); }
public static function destroy($id) { $hospital = Hospital::find($id); $hospital->destroy(); flash('Hospital removed successfully!'); Redirect::to('/hospitals'); }
public static function getDelete() { $id = Input::get('id'); $mesa = Mesa::find($id); $mesa->delete(); return Redirect::to('/mesa'); }
public function doLogin() { // validate the info, create rules for the inputs $rules = array('email' => 'required|email', 'password' => 'required|alphaNum|min:3'); // run the validation rules on the inputs from the form $validator = Validator::make(Input::all(), $rules); // if the validator fails, redirect back to the form if ($validator->fails()) { return Redirect::to('login')->withErrors($validator)->withInput(Input::except('password')); // send back the input (not the password) so that we can repopulate the form } else { // create our user data for the authentication $userdata = array('email' => Input::get('email'), 'password' => Input::get('password')); // attempt to do the login if (Auth::attempt($userdata)) { // validation successful! // redirect them to the secure section or whatever // return Redirect::to('secure'); // for now we'll just echo success (even though echoing in a controller is bad) echo 'SUCCESS!'; } else { // validation not successful, send back to form return Redirect::to('login'); } } }
public function show($name) { if (\Auth::check() && \Auth::user()->permission->name == 'admin') { if (is_numeric($name)) { $dl = Downloads::where('id', '=', $name)->where('trash', '=', '0')->first(); if (is_null($dl)) { return \Redirect::to('404'); } return \View::make('downloads.show')->with('entry', $dl); } else { $dl = Downloads::where('name', '=', $name)->where('trash', '=', '0')->first(); if (is_null($dl)) { return \Redirect::to('404'); } return \View::make('downloads.show')->with('entry', $dl); } } else { if (is_numeric($name)) { $dl = Downloads::where('id', '=', $name)->where('trash', '=', '0')->where('state', '=', '1')->first(); if (is_null($dl)) { return \Redirect::to('404'); } return \View::make('downloads.show')->with('entry', $dl); } else { $dl = Downloads::where('name', '=', $name)->where('trash', '=', '0')->where('state', '=', '1')->first(); if (is_null($dl)) { return \Redirect::to('404'); } return \View::make('downloads.show')->with('entry', $dl); } } }
public function save () { $param = Input::all(); $validator = Validator::make($param, [ 'site_title' => 'required', 'meta_description' => 'required', 'meta_keywords' => 'required', 'email_support' => 'required|email', 'count_pagination' => 'required' ]); if ( $validator->fails() ) { $output = ''; $errors = $validator->messages()->toArray(); foreach ($errors as $error) { $output .= $error[0] . '<br>'; } return View::make('admin.elements.error')->with('errors', $output); } AppSettings::set('site_title', $param['site_title']); AppSettings::set('meta_description', $param['meta_description']); AppSettings::set('meta_keywords', $param['meta_keywords']); AppSettings::set('email_support', $param['email_support']); AppSettings::set('count_pagination', $param['count_pagination']); return Redirect::to(URL::previous()); }
public static function poista($om_id) { self::check_logged_in(); $omistaja = new Omistaja(array('om_id' => $om_id)); $omistaja->destroy(); Redirect::to('/omistaja', array('message' => 'Omistaja on nyt poistettu onnistuneesti!')); }
public function getIndex() { if ($this->access['is_view'] == 0) { return Redirect::to('')->with('message', SiteHelpers::alert('error', ' Your are not allowed to access the page ')); } // Filter sort and order for query $sort = !is_null(Input::get('sort')) ? Input::get('sort') : ''; $order = !is_null(Input::get('order')) ? Input::get('order') : 'asc'; // End Filter sort and order for query // Filter Search for query $filter = !is_null(Input::get('search')) ? $this->buildSearch() : ''; // End Filter Search for query $page = Input::get('page', 1); $params = array('page' => $page, 'limit' => !is_null(Input::get('rows')) ? filter_var(Input::get('rows'), FILTER_VALIDATE_INT) : static::$per_page, 'sort' => $sort, 'order' => $order, 'params' => $filter, 'global' => isset($this->access['is_global']) ? $this->access['is_global'] : 0); // Get Query $results = $this->model->getRows($params); // Build pagination setting $page = $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false ? $page : 1; $pagination = Paginator::make($results['rows'], $results['total'], $params['limit']); $this->data['rowData'] = $results['rows']; // Build Pagination $this->data['pagination'] = $pagination; // Build pager number and append current param GET $this->data['pager'] = $this->injectPaginate(); // Row grid Number $this->data['i'] = $page * $params['limit'] - $params['limit']; // Grid Configuration $this->data['tableGrid'] = $this->info['config']['grid']; $this->data['tableForm'] = $this->info['config']['forms']; $this->data['colspan'] = SiteHelpers::viewColSpan($this->info['config']['grid']); // Group users permission $this->data['access'] = $this->access; // Render into template $this->layout->nest('content', 'rinvoices.index', $this->data)->with('menus', SiteHelpers::menus()); }
/** * Saves user submissions for Independent Sponsor requests. */ public function postRequest() { //Grab input $address1 = Input::get('address1'); $address2 = Input::get('address2'); $city = Input::get('city'); $state = Input::get('state'); $postal = Input::get('postal'); $phone = Input::get('phone'); $all_input = Input::all(); //Validate input $rules = array('address1' => 'required', 'city' => 'required', 'state' => 'required', 'postal' => 'required', 'phone' => 'required'); $validation = Validator::make($all_input, $rules); if ($validation->fails()) { return Redirect::to('/documents/sponsor/request')->withInput()->withErrors($validation); } //Add new user information to their record $user = Auth::user(); $user->address1 = $address1; $user->address2 = $address2; $user->city = $city; $user->state = $state; $user->postal_code = $postal; $user->phone = $phone; $user->save(); //Add UserMeta request $request = new UserMeta(); $request->meta_key = UserMeta::TYPE_INDEPENDENT_SPONSOR; $request->meta_value = 0; $request->user_id = $user->id; $request->save(); return Redirect::to('/user/edit/' . $user->id)->with('message', 'Your request has been received.'); }
public function postIndex() { if (\Auth::attempt(array('email' => \Input::get('email'), 'password' => \Input::get('password')))) { return \Redirect::intended('/'); } return \Redirect::to('/?errors=true'); }
/** * Store a newly created resource in storage. * * @return Response */ public function store() { $lskill = new Lskill(); // skill Model 内容 $lskill->name_jp = Input::get('name_jp'); $lskill->name_en = Input::get('name_en'); $lskill->name_cn = Input::get('name_cn'); $lskill->desc_jp = Input::get('desc_jp'); $lskill->desc_en = Input::get('desc_en'); $lskill->desc_cn = Input::get('desc_cn'); $lskill->race = Input::get('race'); $lskill->attr = Input::get('attr'); $lskill->job = Input::get('job'); $lskill->power = Input::get('power'); $lskill->power_type = Input::get('power_type'); $lskill->admin_memo = Input::get('admin_memo'); // 原则上做成时非公开 $lskill->open = false; // $lskill->update_datetime = now(); if ($lskill->save()) { return Redirect::to('skill'); } else { return Redirect::back()->withInput()->withErrors('保存失败!'); } }
public function addPhotoToOeuvre() { //Auth::checkSupervisorAuthentication(); $oeuvre_id = $_POST['oeuvre_id']; DashboardModel::addPhotoToOeuvre($oeuvre_id); Redirect::to('dashboard/index'); }
public function doLogout() { Auth::logout(); // log the user out of our application return Redirect::to('login'); // redirect the user to the login screen }