- user id cast to string

- include all migrations in migration process
This commit is contained in:
Peter Papp
2021-03-22 10:43:37 +01:00
parent 4999b23474
commit 80f27d7448
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -34,6 +34,7 @@ class User extends Authenticatable
]; ];
protected $casts = [ protected $casts = [
'id' => 'string',
'email_verified_at' => 'datetime', 'email_verified_at' => 'datetime',
]; ];
+16
View File
@@ -29,5 +29,21 @@ class AppServiceProvider extends ServiceProvider
// Set locale for carbon dates // Set locale for carbon dates
setlocale(LC_TIME, $get_time_locale); setlocale(LC_TIME, $get_time_locale);
// Get all migrations with all directories
$this->loadMigrationsFrom(
$this->get_migration_paths()
);
}
/**
* @return array
*/
private function get_migration_paths(): array
{
$mainPath = database_path('migrations');
$directories = glob($mainPath . '/*', GLOB_ONLYDIR);
return array_merge([$mainPath], $directories);
} }
} }