Artisan::queue PHP Method

queue() public static method

Queue the given console command.
public static queue ( string $command, array $parameters = [] ) : void
$command string
$parameters array
return void
        public static function queue($command, $parameters = array())
        {
            //Method inherited from \Illuminate\Foundation\Console\Kernel
            \Someline\Console\Kernel::queue($command, $parameters);
        }

Usage Example

Example #1
0
 /**
  * Application deploy.
  *
  * @param Request $request
  * @return \Illuminate\Http\JsonResponse
  */
 public function deploy(Request $request)
 {
     list($algo, $hash) = explode('=', $request->header('X-Hub-Signature'), 2);
     if (!hash_equals($hash, hash_hmac($algo, $request->getContent(), config('services.github-webhook.secret')))) {
         \Log::notice('Github Webhook', ['auth' => 'failed', 'ip' => $request->ip()]);
     } else {
         \Log::info('Github Webhook', ['auth' => 'success', 'ip' => $request->ip()]);
         \Artisan::queue('deploy');
     }
     return response()->json('', 200);
 }
All Usage Examples Of Artisan::queue