Fix command dispatching
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
use CachetHQ\Cachet\Settings\Repository;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Jenssegers\Date\Date;
|
||||
@@ -159,3 +160,17 @@ if (!function_exists('cachet_redirect')) {
|
||||
return app('redirect')->to($url, $status, $headers);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('execute')) {
|
||||
/**
|
||||
* Send the given command to the dispatcher for execution.
|
||||
*
|
||||
* @param object $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function execute($command)
|
||||
{
|
||||
app(Dispatcher::class)->execute($command);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user