<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # laravel自定義指令生成token 生成基礎對象指令 ~~~ php artisan make:command GetToken ~~~ 在app\Console\Commands\目錄下可以找到GetToken, 如果你之前沒有執行過這個指令,是無法找到Commands目錄的。 具體編寫如下: > User是用戶模型,映射用戶表 > $signature 是用來生成指令的名字 > $description 是用來查看指令的時候的描述,說明本指令是用來做啥的 > handle手柄函數,編寫本指令的具體邏輯 ~~~ <?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Models\User; use Illuminate\Support\Facades\Auth; class GetToken extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'cms:get-token'; /** * The console command description. * * @var string */ protected $description = '快速生成token'; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @return mixed */ public function handle() { // $userId = $this->ask("請輸入用戶id"); $user = User::find($userId); if(!$user) { return $this->error("用戶不存在"); } $ttl = 365*24*60; $this->info(Auth::guard('api')->setTTL($ttl)->fromUser($user)); } } ~~~ 使用方法: ~~~ php artisan cms:get-token ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看