Fixed a couple of issues following update of photos.andyheathershaw.uk

This commit is contained in:
Andy Heathershaw 2017-04-18 20:17:09 +01:00
parent a645a126b3
commit 02ab6d77df
2 changed files with 9 additions and 10 deletions

View File

@ -97,8 +97,7 @@ class AppInstallation
Artisan::call('cache:clear'); Artisan::call('cache:clear');
Artisan::call('migrate', ['--force' => true]); Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]);
Artisan::call('db:seed');
$className = sprintf('DataMigrationV%s', str_replace(['.', '-'], '_', $appVersionNumber)); $className = sprintf('DataMigrationV%s', str_replace(['.', '-'], '_', $appVersionNumber));
if (class_exists($className)) if (class_exists($className))

View File

@ -9,14 +9,14 @@ class AlbumObserver
public function creating(Album $album) public function creating(Album $album)
{ {
// Re-generate the alias and path // Re-generate the alias and path
if (is_null($album->url_alias))
{
$album->generateAlias(); $album->generateAlias();
$album->generateUrlPath();
} }
public function updating(Album $album) if (is_null($album->url_path))
{ {
// Re-generate the alias and path
$album->generateAlias();
$album->generateUrlPath(); $album->generateUrlPath();
} }
} }
}