To create a custom module in Laravel 9 or older version you will use nwidart/laravel-modules. nwidart/laravel-modules is a Laravel package used to manage large Laravel apps using modules. A module is similar to a Laravel package, containing views, controllers, or models. This package is supported and tested from Laravel 5+.
- To install the nwidart/laravel-modules package, run this command.
composer require nwidart/laravel-modules
- To create a module under your nwidart/laravel-modules, run this command:
php artisan module:make Customer
The above command will create a Customer module, you can check under Module/customer.
I hope this helps you.