aplicación Laravel que se ejecuta en consola
app()->runningInConsole()
Riat Cloud
app()->runningInConsole()
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
PackageCommandClassNameHere::class,
]);
$this->app->booted(function () {
$schedule = $this->app->make(Schedule::class);
$schedule->command('signature:command')->everyTwoHours();
});
}
}