How To Use Custom File Names In Laravel Migrations?
I want shorter names for my migration files.
This project will not have tens of thousands of migrations, therefor 2019_11_05_191747_create_units_table.php
is verbose.
I want to have clean migration file names like:0001_create_users_table.php
0002_create_units_table.php
But the code in vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php
is exploding on _
and not liking it.Symfony\Component\Debug\Exception\FatalThrowableError : Class '' not found
How to get this done?
Answer
You can't because you should not change Laravel main core (for update compatibility reasons)
You should use the migrations as intended with "YYYY_MM_DD_HHMMSS_action_table_table_description.php" format.
Well, there is a solution, which would be to create a custom command and do what laravel migration does but with another file format and that's a lot of work for just the name of the migration files.
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?