当前位置: 首页>>代码示例>>PHP>>正文


PHP Input::except方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Input::except方法的典型用法代码示例。如果您正苦于以下问题:PHP Input::except方法的具体用法?PHP Input::except怎么用?PHP Input::except使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Input的用法示例。


在下文中一共展示了Input::except方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: userList

 /**
 Method to get information about the logged in user
 @param void
 @return view
 */
 public function userList()
 {
     if (!Auth::check()) {
         return Redirect::to('/');
     }
     $message = '';
     if (Request::isMethod('post')) {
         $data = Input::except('_token');
         $password = Hash::make(Input::get('password'));
         $user = new User();
         $user->name = Input::get('name');
         $user->email = Input::get('email');
         $user->password = $password;
         $username = Input::get('name');
         $userEmail = Input::get('email');
         if ($user->save()) {
             try {
                 Mail::send('emails.welcome', ['userEmail' => $username], function ($m) use($userEmail, $username) {
                     $m->to($userEmail, $username)->subject('Express Rental');
                 });
             } catch (Exception $ex) {
             }
             $message = 'Added Successfully';
             return Redirect::to('/users/list')->with('message', $message);
         } else {
             $message = 'Addition not Successfully';
             return Redirect::to('/users/list')->withErrors('message', $message);
         }
     } else {
         $allUserInfo = DB::table('users')->orderBy('users.id', 'DESC')->paginate(5);
         return view('Home.list')->with(compact('allUserInfo'));
     }
 }
开发者ID:sddcronjob,项目名称:expressrental,代码行数:38,代码来源:HomeController.php

示例2: store

 public function store()
 {
     // dd(Input::all());
     $adhesion = new Adhesion();
     $adhesion->fill(Input::except('adherent', 'adherent2', '_token', '_method'));
     $adhesion->is_payed = Input::get('is_payed') ? 1 : 0;
     // return dd($adhesion);
     $adhesion->save();
     $type = Input::get('type');
     switch ($type) {
         case 'conso':
             $adhesion->personne()->attach(Input::get('adherent'));
             break;
         case 'couple':
             $adhesion->personne()->attach(Input::get('adherent'));
             $adhesion->personne()->attach(Input::get('adherent2'));
             break;
         case 'pro_personne':
             $adhesion->personne()->attach(Input::get('adherent'));
             break;
         case 'pro_structure':
             $adhesion->structure()->attach(Input::get('adherent'));
             break;
         default:
             dd('problème');
             break;
     }
     // dd($adhesion);
 }
开发者ID:gAb09,项目名称:NetP,代码行数:29,代码来源:AdhesionG.php

示例3: registerCreate

 public function registerCreate()
 {
     $user = DB::table('idenCardNo_HN')->where('idenCardNo', Input::get('idenCardNo'))->first();
     $validator = Validator::make(Input::all(), array('idenCardNo' => 'min:13|idencardno_exist|already_register', 'phoneNo' => 'min:10|unique:users', 'emailAddr' => 'email|unique:users'), array('idenCardNo.min' => 'ท่านกรอกเลขบัตรประจำตัวประชาชนไม่ครบ13หลัก', 'idenCardNo.idencardno_exist' => 'ท่านยังไม่ได้เป็นผู้ป่วยของโรงพยาบาล', 'idenCardNo.already_register' => 'ท่านได้ทำการสมัครสมาชิกไปแล้ว', 'phoneNo.min' => 'ท่านกรอกเบอร์โทรศัพท์ไม่ครบ', 'phoneNo.unique' => 'เบอร์โทรศัพท์นี้มีอยู่ในระบบแล้ว', 'emailAddr.email' => 'รูปแบบอีเมลไม่ถูกต้อง', 'emailAddr.unique' => 'อีเมลนี้มีอยู่ในระบบแล้ว'));
     if ($validator->passes()) {
         $addUser = new User();
         $addUser->type = 'patient';
         $addUser->username = $user->HN;
         $addUser->name = Input::get('name');
         $addUser->surname = Input::get('surname');
         $addUser->birthdate = Input::get('birthdate');
         $addUser->address = Input::get('address');
         $addUser->phoneNo = Input::get('phoneNo');
         $addUser->emailAddr = Input::get('emailAddr');
         $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
         $charactersLength = strlen($characters);
         $randomString = '';
         for ($i = 0; $i < 8; $i++) {
             $randomString .= $characters[rand(0, $charactersLength - 1)];
         }
         //mail(Input::get('emailAddr'),"ตรวจสอบรหัสผ่านในการเข้าสู่เว็บไซต์ OPDSystem",$randomString ,'');
         $addUser->password = Hash::make($randomString);
         $addUser->save();
         DB::table('idenCardNo_HN')->where('idenCardNo', Input::get('idenCardNo'))->where('HN', $user->HN)->update(array('registered' => 1));
         return Redirect::to('login/register')->with('flash_notice', $randomString);
     } else {
         return Redirect::to('login/register')->withErrors($validator)->withInput(Input::except('password'))->withInput(Input::except('password_confirmation'))->withInput();
     }
 }
开发者ID:nitipatch,项目名称:OPDSystem,代码行数:29,代码来源:RegisterController.php

示例4: dologin

 public function dologin()
 {
     // validate the info, create rules for the inputs
     $rules = array('username' => 'required', 'password' => 'required');
     // 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('/')->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('username' => Input::get('username'), 'password' => Input::get('password'));
         $remember = Input::has('remember_me') ? true : false;
         // attempt to do the login
         if (Auth::attempt($userdata, $remember)) {
             // 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)
             return Redirect::to('user/dashboard');
         } else {
             // validation not successful, send back to form
             return Redirect::to('login')->with('message', 'session broken');
         }
     }
 }
开发者ID:hendrilara,项目名称:kemenpan,代码行数:27,代码来源:AuthController.php

示例5: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     try {
         $rules = array('username' => 'required', 'email' => 'required|email', 'phone' => 'required|numeric');
         $validator = Validator::make(Input::all(), $rules);
         // process the login
         if ($validator->fails()) {
             return Redirect::to('admin/members/')->withErrors($validator)->withInput(Input::except('password'));
         } else {
             // store
             $member = new members();
             $member->username = Input::get('username');
             $member->email = Input::get('email');
             $member->phone = Input::get('phone');
             $member->profilePic = "avatar.png";
             $member->save();
             // redirect
             Session::flash('message', 'Successfully created Member!');
             return Redirect::to('admin/members/');
         }
     } catch (\Illuminate\Database\QueryException $e) {
         Session::flash('error', "SQL Error: " . $e->getMessage() . "\n");
         return Redirect::to('admin/members/');
     }
 }
开发者ID:stacklabelX,项目名称:Laravel-CMS-App,代码行数:30,代码来源:MembersController.php

示例6: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(CreateMouseRequest $request, $id)
 {
     $input = Input::except('_method', '_token');
     $mouse = Mouse::findOrFail($id);
     $mouse->update($input);
     return redirect('projects/' . $mouse->project_id);
 }
开发者ID:jaceil,项目名称:abeomehd,代码行数:14,代码来源:MouseController.php

示例7: save

 public function save($id = null)
 {
     $item = $this->getItem($id);
     $item->fill(Input::except('_token'));
     $item->save();
     return redirect($this->getUrl());
 }
开发者ID:Phrantiques,项目名称:toolbox-laravel,代码行数:7,代码来源:TableController.php

示例8: doLogin

 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('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)
             return redirect('admin');
         } else {
             // validation not successful, send back to form
             return redirect('login');
         }
     }
 }
开发者ID:pechatny,项目名称:kolizej,代码行数:26,代码来源:HomeController.php

示例9: getData

 /**
  * get an array of data to use in the response
  * @param Query $query the query to use to retrieve the data
  * @param Paginator $paginator
  * @param array $additionalData an associative array of data to merge with the data array
  */
 protected function getData($query, $additionalData = array())
 {
     //use this hook to alter the parameters
     $paginator = null;
     if (Input::get('page') || $this->paginate) {
         $beforePagination = Event::fire('before.pagination', array(&$query));
         //check if $object is a model or a relation
         $model = $query->getModel();
         $model = method_exists($model, 'getRelated') ? $model->getRelated() : $model;
         $perPage = Input::get('pp') ?: $model->getPerPage();
         $paginator = $query->paginate($perPage);
         //preserve the url query in the paginator
         $paginator->appends(Input::except('page'));
     }
     $results = isset($paginator) ? $paginator->getCollection() : $query->get();
     $data = array();
     $data[$this->resultsKey] = $this->isAjaxRequest() ? $results->toArray() : $results;
     $data['total'] = isset($paginator) ? $paginator->getTotal() : $data->{$this->resultsKey}->count();
     if ($paginator) {
         $data['paginator'] = $paginator;
     }
     if (is_array($additionalData)) {
         $data = array_merge($data, $additionalData);
     }
     return $data;
 }
开发者ID:whitegolem,项目名称:laracrud,代码行数:32,代码来源:CrudController.php

示例10: index

 /**
  * Ce controller à pour but de gérer la logique de recherche d'un film dans la base de données
  * Le controller gère aussi les topics lorsque l'utilisateur fait une recherche via les checkboxes sur
  * la page de d'affichage des résultats.
  * Les fonctions paginate servent à créer le paginator qui est simplement l'affichage des films 20 par 20.
  *
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $search = Input::get('search');
     $topics = Input::except('search', 'page');
     if (empty($topics)) {
         // Pas de topics on renvoie simplement les films correspondants
         $allMovies = Movies::where('title', 'like', "%{$search}%")->paginate(20)->appends(Input::except('page'));
     } else {
         // SI on a des topics dans l'input il est nécessaire de filtrer
         $movies = Topics::whereIn('topic_name', $topics)->with('movies')->get();
         $moviesCollection = Collection::make();
         foreach ($movies as $movy) {
             $moviesCollection->add($movy->movies()->where('title', 'like', "%{$search}%")->get());
         }
         $moviesCollection = $moviesCollection->collapse();
         // Il n'est pas possible de créer la paginator directement, on le crée donc à la main
         $page = Input::get('page', 1);
         $perPage = 20;
         $offset = $page * $perPage - $perPage;
         $allMovies = new LengthAwarePaginator($moviesCollection->slice($offset, $perPage, true), $moviesCollection->count(), $perPage);
         $allMovies->setPath(Paginator::resolveCurrentPath());
         $allMovies->appends(Input::except('page'));
     }
     // A la vue correspondante on lui renvoie une liste des films correspondants à la recherche, le tout paginé
     return view('search', compact('allMovies'));
 }
开发者ID:Tirke,项目名称:ShortMovies,代码行数:35,代码来源:SearchController.php

示例11: getAllPaging

 public function getAllPaging($where = [], $number_pagination = '')
 {
     $where['del_flg'] = 1;
     $channels = null;
     //Split username of channel
     $where_temp = $where;
     foreach ($where_temp as $k => $v) {
         //username
         if (isset($where_temp['daily_channel_username']) && $where_temp['daily_channel_username']) {
             $channels = \App\Channels::where('daily_channel_username', 'LIKE', '%' . $v . '%');
             break;
         }
     }
     if ($channels == null) {
         $channels = \App\Channels::where($where);
     }
     if ($number_pagination) {
         $channels = $channels->paginate($number_pagination);
         foreach (Input::except('page') as $input => $value) {
             $channels->appends($input, $value);
         }
     } else {
         $channels = $channels->get();
     }
     return $channels;
 }
开发者ID:lmkhang,项目名称:mcntw,代码行数:26,代码来源:Channels.php

示例12: loginData

 public function loginData()
 {
     // Getting all post data
     $data = Input::all();
     // Applying validation rules.
     $rules = array('email' => 'required|email', 'password' => 'required|min:6');
     $validator = Validator::make($data, $rules);
     if ($validator->fails()) {
         // If validation falis redirect back to login.
         return Redirect::to('/login')->withInput(Input::except('password'))->withErrors($validator);
     } else {
         $userdata = array('email' => Input::get('email'), 'password' => Input::get('password'));
         $pasword = Input::get('password');
         $HasPassword = Hash::make($pasword);
         $encriptPassword = bcrypt($pasword);
         echo $HasPassword, "<br>";
         // doing login.
         $validate_admin = DB::table('admintab')->select('email', 'password')->where('email', Input::get('email'))->first();
         echo $FetchPassword = $validate_admin->password;
         if ($FetchPassword == $HasPassword) {
             echo "if statement";
         } else {
             echo "else statement";
         }
         // else {
         //   // if any error send back with message.
         //   Session::flash('error', 'Something went wrong');
         //   return Redirect::to('login');
         // }
     }
 }
开发者ID:Ankitj13,项目名称:sss,代码行数:31,代码来源:loginAdmin.php

示例13: index

 public function index()
 {
     $model = null;
     $filter = Input::except(["page", "paginado", "cantPage", "relaciones", "orderBy", "filters", "methodFilter"]);
     $filters = Input::get("filters", []);
     if (!empty($filters)) {
         if (!$this->filters($filters)) {
             return $this->respondInternalError();
         }
     }
     $relaciones = Input::get("relaciones", []);
     if (!empty($relaciones)) {
         if (!$this->relations($relaciones)) {
             return $this->respondInternalError();
         }
     }
     $orderBy = Input::get("orderBy", []);
     if (!empty($orderBy)) {
         if (!$this->orderBy($orderBy)) {
             return $this->respondInternalError();
         }
     }
     $methodFilter = Input::get("methodFilter", 'filter');
     $model = call_user_func_array([$this, $methodFilter], [&$filter]);
     if (empty($model)) {
         return $this->respondNotFound();
     }
     $data = ['data' => $model, 'error' => false];
     return $this->respond($data);
 }
开发者ID:juaguz,项目名称:apigenerator,代码行数:30,代码来源:Api.php

示例14: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $company = Company::findOrFail($id);
     $message = '';
     $users = User::whereRaw('company_id = ? order by first_name', array($company->id))->paginate(15)->appends(Input::except('page'));
     return view('company.show', ['company' => $company, 'users' => $users, 'message' => $message]);
 }
开发者ID:keiwerkgvr,项目名称:salesperformanceindicator,代码行数:13,代码来源:TrainingController.php

示例15: doRegister

 public function doRegister()
 {
     $rules = array('password' => 'required|alpha_num|min:3', 'username' => 'required|min:3', 'firstName' => 'required', 'lastName' => 'required');
     // 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('register')->withErrors($validator)->withInput(Input::except('password'));
         // send back the input (not the password) so that we can repopulate the form
     } else {
         $credentials = Input::only('firstName', 'lastName', 'username', 'password');
         $credentials['password'] = Hash::make($credentials['password']);
         try {
             $user = User::create($credentials);
         } catch (Exception $e) {
             return Response::json(['error' => 'User already exists.'], Illuminate\Http\Response::HTTP_CONFLICT);
         }
         $userdata = array('username' => Input::get('username'), 'password' => Input::get('password'));
         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)
             return Redirect::to('/');
         } else {
             // validation not successful
             return Redirect::to('/');
         }
     }
 }
开发者ID:sl249,项目名称:carRental,代码行数:30,代码来源:HomeController.php


注:本文中的Illuminate\Support\Facades\Input::except方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。