當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。