Fixes for passing variables to artisan commands

This commit is contained in:
David Bomba 2021-06-04 07:30:11 +10:00
parent d427812cc3
commit d6f1caef73
3 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ class SchedulerCheck implements ShouldQueue
{ {
try { try {
Artisan::call('migrate', ['--force' => 'true']); Artisan::call('migrate', ['--force' => true]);
} catch (\Exception $e) { } catch (\Exception $e) {
nlog("I wasn't able to migrate the data."); nlog("I wasn't able to migrate the data.");
nlog($e->getMessage()); nlog($e->getMessage());

View File

@ -57,9 +57,9 @@ class UpdateUserLastLogin implements ShouldQueue
if($user->ip != $ip) if($user->ip != $ip)
{ {
$nmo = new NinjaMailerObject; $nmo = new NinjaMailerObject;
$nmo->mailable = new UserLoggedIn($user, $user->account->companies()->first(), $ip); $nmo->mailable = new UserLoggedIn($user, $user->account->companies->first(), $ip);
$nmo->company = $user->account->companies()->first(); $nmo->company = $user->account->companies->first();
$nmo->settings = $user->account->companies()->first()->settings; $nmo->settings = $user->account->companies->first()->settings;
$nmo->to_user = $user; $nmo->to_user = $user;
NinjaMailerJob::dispatch($nmo); NinjaMailerJob::dispatch($nmo);

View File

@ -133,7 +133,7 @@ class Company extends BaseModel
public function all_documents() public function all_documents()
{ {
return $this->HasMany(Document::class); return $this->hasMany(Document::class);
} }
public function getEntityType() public function getEntityType()