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


PHP Log::alert方法代码示例

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


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

示例1: login

 public function login()
 {
     $response = $this->steam->validate();
     Log::alert(json_encode($this->steam));
     Log::alert(json_encode(\Config::get('steam-auth.api_key')));
     if ($response) {
         $info = $this->steam->getUserInfo();
         if (!is_null($info)) {
             $user = User::where('steam_id', $info->getSteamID64())->first();
             if (!is_null($user)) {
                 Auth::login($user, true);
                 return redirect('/');
                 // redirect to site
             } else {
                 $data = ['name' => $info->getNick(), 'steam_id' => $info->getSteamID64(), 'avatar' => $info->getProfilePictureFull()];
                 $user = User::create($data);
                 Auth::login($user, true);
                 return redirect('/');
                 // redirect to site
             }
         }
     } else {
         return $this->steam->redirect();
         // redirect to Steam login page
     }
 }
开发者ID:enizunic93,项目名称:SteamLotterry,代码行数:26,代码来源:AuthController.php

示例2: registerPermissions

 /**
  *  Register the permissions.
  *
  * @return bool
  */
 public function registerPermissions()
 {
     try {
         $this->getPermissions()->map(function ($permission) {
             $this->gate->define($permission->name, function ($user) use($permission) {
                 return $user->hasPermissionTo($permission);
             });
         });
         return true;
     } catch (Exception $e) {
         Log::alert('Could not register permissions');
         return false;
     }
 }
开发者ID:austinkregel,项目名称:corrections,代码行数:19,代码来源:PermissionRegistrar.php

示例3: destroy

 /**
  * Remove o usuário do aplicativo.
  * @param $id
  */
 public function destroy($id)
 {
     if ($id == null) {
         abort(404);
     }
     $user = User::find($id);
     if ($user->destroy($user->id)) {
         unlink($user->avatar);
     }
     Log::alert("A conta do usuário {$user->name} foi excluida");
     toast()->success("Conta excluida!");
     return redirect()->to('/auth/login');
 }
开发者ID:aureliomachados,项目名称:social,代码行数:17,代码来源:HomeController.php

示例4: alert

 /**
  * Action must be taken immediately.
  *
  * Example: Entire website down, database unavailable, etc. This should
  * trigger the SMS alerts and wake you up.
  *
  * @param string $message
  * @param array $context
  *
  * @return bool
  */
 public function alert($message, array $context = [])
 {
     return Log::alert($message, $context);
 }
开发者ID:rajeshpillai,项目名称:dfe-common,代码行数:15,代码来源:Lumberjack.php

示例5: alert

 /**
  * @param        $data
  * @param array  $contextualData
  * @param array  $location
  */
 public static function alert($data, array $location = [], array $contextualData = [])
 {
     $msg = self::renderMessage($data, $location);
     /** @noinspection PhpUndefinedMethodInspection */
     BaseLog::alert($msg, $contextualData);
 }
开发者ID:ChristopheBrun,项目名称:hLib,代码行数:11,代码来源:Logger.php


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