Fix command dispatching

This commit is contained in:
James Brooks
2018-06-25 22:25:54 +01:00
parent dd6bbce517
commit 8bb8ee3dc7
30 changed files with 88 additions and 73 deletions

View File

@@ -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);
}
}