コード例 #1
0
ファイル: PostRequest.php プロジェクト: spitzgoby/spitzgoby
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     if ($this->isUpdate()) {
         return Post::findOrFail($this->get('id'))->user_id == \Auth::id();
     }
     return \Auth::check();
 }
コード例 #2
0
ファイル: SendTestRequest.php プロジェクト: abada/webshop
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     if (\Auth::check()) {
         return true;
     }
     return false;
 }
コード例 #3
0
ファイル: UpdatePaperRequest.php プロジェクト: jhcict/mcq
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     if (Auth::check() && Auth::user()->hasAccess('create_paper')) {
         return true;
     }
     return false;
 }
コード例 #4
0
ファイル: Request.php プロジェクト: andreea-bucur/GuestBook
 public function authorize()
 {
     // Only allow logged in users
     return \Auth::check();
     // Allows all users in
     // return true;
 }
コード例 #5
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     return \Auth::check();
 }
コード例 #6
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     // only allow updates if the user is logged in
     return \Auth::check();
 }
コード例 #7
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     if (\Auth::check('auth')) {
         return true;
     }
 }
コード例 #8
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     //only allow logged in users
     return \Auth::check();
 }