I am working on Laravel^9.19" project with php^8.1, I created a Modules folder and then I created a migration files inside, my structure is like this :
--app
--Modules
----user
------Database
--------Migrations
----------2023_07_19_220540_create_users_table.php
and inside my AppServiceProvider
:
public function register()
{
//
$this->loadMigrationsFrom(base_path('Modules/UserManagement/Database/Migrations'));
}
and inside my composer.json
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/",
}
},
the problem is when I am trying to execute php artisan migrate
it gave me nothing to migrate
because it is not scanning any folder other than app/database
I search online so much but I couldn't find a solution, kindly advice with the solution in this case