argument('supplier')) { try { $o = Supplier::active() ->where('name','ilike',$this->argument('supplier')) ->sole(); } catch (ModelNotFoundException $e) { $this->error(sprintf('Supplier [%s] not found',$this->argument('supplier'))); return self::FAILURE; } Job::dispatchSync($o->name); return self::SUCCESS; } foreach (Supplier::active()->get() as $o) Job::dispatchSync($o->name); return self::SUCCESS; } }