It's an extension for our theme https://github.com/hieu-pv/nf-theme
composer require vicoders/migration-for-nftheme
Open
config/app.php
and register the required service provider.
'providers' => [
// .... Others providers
\Vicoders\Database\Providers\DatabaseServiceProvider::class,
],
Add the following code to autoload
section of your composer.json
"classmap": [
"database"
]
By run publis command we will see a new folder called database
in your theme root directory
php command migration:publish
Create migration file
php command make:migration {file_name} --create="{table_name}"
Or you can create another to update existing table
php command make:migration {file_name} --table="{existing_table_name}"
Example:
// create test table
php command make:migration create_test_table --create=test
// update test table
php command make:migration add_more_column_to_test_table --table=test
php command migrate
php command migrate:rollback
{tip} Drink tea and relax !