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


PHP UserRepository::store方法代码示例

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


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

示例1: store

 /**
  * Store a newly created user in storage.
  *
  * @param UserRequest $request
  * @return Response
  */
 public function store(UserRequest $request)
 {
     $input = $request->only('username', 'email', 'password', 'password_confirmation');
     $this->userRepository->store($input);
     Flash::message('User created');
     return Redirect()->route('users');
 }
开发者ID:alons182,项目名称:guanacastevende,代码行数:13,代码来源:UsersController.php

示例2: postRegister

 /**
  * Handle a registration request for the application.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  App\Repositories\UserRepository
  * @return \Illuminate\Http\Response
  */
 public function postRegister(Request $request, UserRepository $userRepository)
 {
     $this->validate($request, ['name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|confirmed|min:6']);
     $user = $userRepository->store($request);
     Auth::login($user);
     return redirect('/');
 }
开发者ID:mime55,项目名称:lumenvue,代码行数:14,代码来源:AuthController.php

示例3: postRegister

 public function postRegister(UserRequest $request)
 {
     $user = $this->userRepository->store($request->all());
     Auth::login($user);
     Flash::message('Cuenta Creada correctamente. se te ha enviado un correo con la información de usuario. Completa tu perfil por favor, es importante !');
     $this->mailer->welcome($user->toArray());
     try {
         $this->newsletterList->subscribeTo('Guanacaste Vende', $request->get('email'), $request->get('username'), '');
     } catch (\Mailchimp_Error $e) {
         Flash::message($e->getMessage());
     }
     return redirect()->route('profile.edit', $user->username);
 }
开发者ID:alons182,项目名称:guanacastevende,代码行数:13,代码来源:AuthController.php

示例4: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $neo4j_config = \Config::get('database.connections.neo4j');
     // Create an admin
     $client = new Everyman\Neo4j\Client($neo4j_config['host'], $neo4j_config['port']);
     $client->getTransport()->setAuth($neo4j_config['username'], $neo4j_config['password']);
     // Check if the admin user already exists, if not create one.
     // Use the Person label, as described by the vocabulary the MEDEA project handles
     // Get the Person label
     $label = $client->makeLabel('Person');
     // Get all of the Person node with the admin email
     $nodes = $label->getNodes("email", "foo@bar.com");
     if ($nodes->count() == 0) {
         $users = new UserRepository();
         $admin = ['firstName' => 'Medea', 'lastName' => 'Admin', 'password' => 'foobar', 'email' => 'foo@bar.com', 'verified' => true, 'description' => 'Dit is de generieke admin user van het MEDEA platform.', 'personType' => ['detectorist', 'validator', 'administrator', 'registrator', 'onderzoeker', 'vondstexpert'], 'showContactInfo' => 'never', 'passContactInfoToAgency' => false];
         $users->store($admin);
         $this->command->info("An admin user was created.");
     } else {
         $this->command->info("The admin user already exists.");
     }
     // Seed the values in the lists of MEDEA
     $this->call(ListValueSeeder::class);
 }
开发者ID:weopendata,项目名称:medea,代码行数:28,代码来源:DatabaseSeeder.php

示例5: postRegister

 /**
  * Handle a registration request for the application.
  *
  * @param  App\Http\Requests\RegisterRequest  $request
  * @param  App\Repositories\UserRepository $user_gestion
  * @return Response
  */
 public function postRegister(RegisterRequest $request, UserRepository $user_gestion)
 {
     $user = $user_gestion->store($request->all(), $confirmation_code = str_random(30));
     //$this->dispatch(new SendMail($user));
     return redirect('/')->with('ok', trans('front/verify.message'));
 }
开发者ID:thaida,项目名称:CMS,代码行数:13,代码来源:AuthController.php

示例6: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  App\requests\UserCreateRequest $request
  *
  * @return Response
  */
 public function store(UserCreateRequest $request)
 {
     $this->user_gestion->store($request->all());
     return redirect('user')->with('ok', trans('back/users.created'));
 }
开发者ID:nitsmax,项目名称:els,代码行数:12,代码来源:UserController.php

示例7: postRegister

 /**
  * Handle a registration request for the application.
  *
  * @param  App\Http\Requests\RegisterRequest  $request
  * @param  App\Repositories\UserRepository $user_gestion
  * @return Response
  */
 public function postRegister(Guard $auth, Request $request, UserRepository $user_gestion, OperadorRepository $operador_gestion, ServiciosOperadorRepository $gestion)
 {
     $inputData = Input::get('formData');
     parse_str($inputData, $formFields);
     if ($inputData != "") {
         $userData = array('username' => $formFields['username'], 'email' => $formFields['email'], 'password' => $formFields['password'], 'email_confirmation' => $formFields['email_confirmation']);
     } else {
         $userData = array('username' => $request->input('username'), 'email' => $request->input('email'), 'password' => $request->input('password'), 'email_confirmation' => $request->input('email_confirmation'));
     }
     //Valida que los campos sean unicos y cumplan con los requerimientos
     $validator = Validator::make($userData, $this->validationRules);
     //Si el validador falla se ejecutan las acciones
     if ($validator->fails()) {
         return response()->json(array('fail' => true, 'errors' => $validator->getMessageBag()->toArray()));
     } else {
         $user = $user_gestion->store($userData, $confirmation_code = str_random(30));
         //Se almacenan los datos por default del contacto, se pueden modificar cuando ya ingrese
         $operadorData = array('nombre_contacto_operador_1' => $formFields['username'], 'telf_contacto_operador_1' => "", 'ip_registro_operador' => $this->getIp(), 'email_contacto_operador' => $formFields['email'], 'direccion_empresa_operador' => "", 'id_usuario' => $user->id, 'id_tipo_operador' => 3, 'estado_contacto_operador' => 1, 'id_usuario_op' => 0);
         //Almacena el operador y almacena en sesion su identificacion
         $operador = $operador_gestion->store($operadorData);
         $request->session()->put('operador_id', $operador->id);
         if ($request->session()->has('user_id')) {
             $request->session()->forget('user_id');
         }
         //Se realiza el login y redireccion
         $request->session()->put('user_name', $user->email);
         $auth->login($user);
         $email = $auth->user()->email;
         $nombre = $auth->user()->email;
         try {
             $this->dispatch(new SendMail($user));
         } catch (Exception $e) {
         }
         /* Busca si ya tiene servicios activos o no */
         //logica que comprueba si el usuario tiene servicios para ser modificados
         //caso contrario ingresa nuevos serviciosS
         $listServicios = $gestion->getServiciosidUsuario($user->id);
         if ($listServicios) {
             $data['id_usuario_op'] = $listServicios[0]->id_usuario_op;
             $request->session()->put('operador_id', $data['id_usuario_op']);
             $request->session()->put('tip_oper', $listServicios[0]->id_tipo_operador);
             return redirect('/detalleServicios')->with('user', $user->id);
         } else {
             $returnHTML = '/IguanaTrip/public/myProfileOp';
             //->with('user', $user->id);
             return response()->json(array('success' => true, 'redirectto' => $returnHTML));
         }
     }
 }
开发者ID:adrianicn,项目名称:IguanaTrip,代码行数:56,代码来源:AuthController.php

示例8: postRegister

 /**
  * Handle a registration request for the application.
  *
  * @param  App\Http\Requests\RegisterRequest  $request
  * @param  App\Repositories\UserRepository $user_gestion
  * @return Response
  */
 public function postRegister(RegisterRequest $request, UserRepository $user_gestion)
 {
     $user = $user_gestion->store($request->all());
     $this->auth->login($user);
     return redirect('/')->with('ok', trans('front/register.ok'));
 }
开发者ID:WenkeZhou,项目名称:laravel5-example,代码行数:13,代码来源:AuthController.php

示例9: postRegister

 /**
  * Handle the registration of user.
  * 
  * @param type UserRegisterRequest $request 
  * @return type view
  */
 public function postRegister(UserRegisterRequest $request, User $user, Company $company)
 {
     $newUser = $user->store($request);
     if ($request->user_type) {
         $company->store($request, $newUser->id);
     }
     return Redirect::route('auth.register.success')->with('user', $newUser);
 }
开发者ID:Vandheer,项目名称:Invendable-jojo,代码行数:14,代码来源:AuthController.php

示例10: postCreate

 public function postCreate(CreateRequest $request)
 {
     $this->userRepository->store($request->all());
     return responseSuccess('添加成功', 'user/index');
 }
开发者ID:lanzhiwang,项目名称:laravel-blog,代码行数:5,代码来源:UserController.php


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