/** * Laravel helper stubs for better static analysis * Include this file in your IDE/phpstorm to help with code completion */ if (!function_exists('now')) { function now(): \Illuminate\Support\Carbon { return \Illuminate\Support\Carbon::now(); } } if (!function_exists('app')) { function app($abstract = null, array $parameters = []) { global $app; if (is_null($abstract)) { return $app; } return $app->make($abstract, $parameters); } } if (!function_exists('config')) { function config($key = null, $default = null) { global $app; if (is_null($key)) { return $app['config']; } return $app['config']->get($key, $default); } } if (!function_exists('session')) { function session($key = null, $default = null) { global $app; if (is_null($key)) { return $app['session']; } return $app['session']->get($key, $default); } } if (!function_exists('logger')) { function logger($message = null, array $context = []) { if (is_null($message)) { return app('log'); } return app('log')->info($message, $context); } } if (!function_exists('event')) { function event($event, $payload = []) { return app('events')->dispatch($event, $payload); } } if (!function_exists('dispatch')) { function dispatch($job) { return app('queue')->push($job); } }