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


PHP Confide::user方法代码示例

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


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

示例1: home

 /**
  * @return $this
  */
 public function home()
 {
     if (Confide::User()) {
         $this->dsp->content = Confide::user()->getContent();
     }
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }
开发者ID:birdiebel,项目名称:G2016,代码行数:10,代码来源:HomeController.php

示例2: update

 /**
  * Update the specified pet in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $pet = Pet::findOrFail($id);
     $data = Input::all();
     $data['user_id'] = Confide::user()->id;
     $validator = Validator::make($data, Pet::$rules);
     $response = [];
     $response['data'] = $data;
     if ($validator->fails()) {
         $response['success'] = false;
         $response['errors'] = $validator->errors();
         if (Request::ajax()) {
             return Response::json($response);
         } else {
             return Redirect::back()->withErrors($validator->errors());
         }
     }
     $pet->update($data);
     $response['success'] = true;
     $response['errors'] = [];
     if (Request::ajax()) {
         return Response::json($response);
     } else {
         return Redirect::action('UsersController@showProfile', Confide::user()->id);
     }
 }
开发者ID:ZJScapstone,项目名称:capstone.dev,代码行数:32,代码来源:PetsController.php

示例3: login

 /**
  * Displays the login form
  *
  * @return  Illuminate\Http\Response
  */
 public function login()
 {
     if (Confide::user()) {
         return Redirect::to('/');
     } else {
         return View::make(Config::get('confide::login_form'));
     }
 }
开发者ID:matalina,项目名称:kids-pledge,代码行数:13,代码来源:UsersController.php

示例4: login

 /**
  * Displays the login form
  *
  * @return  Illuminate\Http\Response
  */
 public function login()
 {
     if (Confide::user()) {
         return Redirect::to('/home');
     } else {
         return View::make('site.user.login');
     }
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:13,代码来源:UsersController.php

示例5: isExist

 /**
  * @param $club_id
  * @return bool
  */
 public static function isExist($club_id)
 {
     $count = DB::table('userclubs')->where('user_id', '=', Confide::user()->id)->where('club_id', '=', $club_id)->count();
     if ($count == 0) {
         return false;
     }
     return true;
 }
开发者ID:birdiebel,项目名称:G2016,代码行数:12,代码来源:Userclub.php

示例6: login

 /**
  * Displays the login form
  *
  * @return  Illuminate\Http\Response
  */
 public function login()
 {
     if (Confide::user()) {
         return Redirect::route('backend.challenges.index');
     } else {
         return View::make(Config::get('confide::login_form'));
     }
 }
开发者ID:arghyapolley,项目名称:backend,代码行数:13,代码来源:UsersController.php

示例7: validateRoles

 /**
  * Provide an array of strings that map to valid roles.
  * @param array $roles
  * @return stdClass
  */
 public function validateRoles(array $roles)
 {
     $user = Confide::user();
     $roleValidation = new stdClass();
     foreach ($roles as $role) {
         $roleValidation->{$role} = empty($user) ? false : $user->hasRole($role);
     }
     return $roleValidation;
 }
开发者ID:ntk148v,项目名称:mini_cms,代码行数:14,代码来源:Role.php

示例8: getIndex

 public function getIndex()
 {
     $user = Confide::user();
     if (!$user->isStaff() && Patient::find($user->id) == null) {
         return Redirect::route('patient.create');
     } else {
         return View::make('home/index', compact('user'));
     }
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:9,代码来源:HomeController.php

示例9: login

 /**
  * Displays the login form
  *
  * @return  Illuminate\Http\Response
  */
 public function login()
 {
     SEOMeta::setTitle(Lang::get("tags.login"));
     if (Confide::user()) {
         return Redirect::to('/');
     } else {
         return View::make(Config::get('confide::login_form'));
     }
 }
开发者ID:kadirarli,项目名称:laravel-self,代码行数:14,代码来源:UsersController.php

示例10: login

 /**
  * Displays the login form
  *
  * @return  Illuminate\Http\Response
  */
 public function login()
 {
     if (Confide::user()) {
         return Redirect::to('/');
     } else {
         $title = 'League Together - Login';
         return View::make('app.default.login')->with('page_title', $title);
         //return View::make(Config::get('confide::login_form'));
     }
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:15,代码来源:UsersController.php

示例11: uploadUserImage

 public function uploadUserImage()
 {
     $user = Confide::user();
     $user->img_path = $this->getAndMoveFile('file');
     if ($user->save()) {
         return Redirect::action('UsersController@show', $user->id);
     } else {
         throw new Exception("user image not updated!");
     }
 }
开发者ID:ZJScapstone,项目名称:capstone.dev,代码行数:10,代码来源:ImagesController.php

示例12: login

 /**
  * Displays the login form
  *
  */
 public function login()
 {
     if (\Confide::user()) {
         // If user is logged, redirect to internal
         // page, change it to '/admin', '/dashboard' or something
         return Redirect::to('/');
     } else {
         $this->renderPage(array("content_view" => Config::get('confide::login_form')));
     }
 }
开发者ID:ayurved,项目名称:Ayurveda,代码行数:14,代码来源:AuthController.php

示例13: showAll

 public function showAll()
 {
     $user = Confide::user();
     $patients = Patient::join('user', 'user.id', '=', 'patient.user_id')->get();
     if ($user->isStaff()) {
         return View::make('home.patient.show-all', compact('user', 'patients'));
     } else {
         return Redirect::route('home.index');
     }
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:10,代码来源:PatientController.php

示例14: createComment

 public function createComment($conversation)
 {
     $user = Confide::user();
     $comment = new Comment();
     $comment->conversation_id = $conversation->id;
     $comment->user_id = $user->id;
     $comment->fill(Input::all());
     $comment->save();
     return Redirect::route('conversation.show', array($conversation->id));
 }
开发者ID:carlosqueiroz,项目名称:medical-management-system,代码行数:10,代码来源:ConversationController.php

示例15: logAudit

 public static function logAudit($entity, $action, $description)
 {
     $audit = new Audit();
     $audit->date = date('Y-m-d');
     $audit->description = $description;
     $audit->user = Confide::user()->username;
     $audit->entity = $entity;
     $audit->action = $action;
     $audit->save();
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:10,代码来源:Audit.php


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