🐛 Ne tĂ©lĂ©charge pas les images quand il n'y en a pas

This commit is contained in:
Clément 2021-02-12 16:17:43 +01:00
parent 3a5a9e93c8
commit a9ee66a2d4
1 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,9 @@ class Home extends Model implements Feedable
{
// Download images on creation
static::created(static function ($home) {
Artisan::call('app:downloadimage ' . $home->id);
if (!empty($home->pictures)) {
Artisan::call('app:downloadimage ' . $home->id);
}
});
}