Support the ongoing development of →
Last updated 2 years ago.

Yes, you can create your own modules in laravel which are separate apps, my current app has 4 folders under the app folder, all of which contain separate controllers, views, jobs etc.

Then you can setup routes to point to the different directories using something like:

Route::group(['middleware' => ['web']], function () {
    // namespace principalcontractor
    Route::group(['middleware' => ['auth', 'PrincipalContractorMiddleware'], 'prefix' => 'principalcontractor', 'namespace' => 'Principalcontractor\Http\Controllers'], function () {
        Route::get('/', function () {
            return view('Principalcontractor.views.index');

Thank you very much , but can you give me a simple project related to that idea to explain the way to do that .. please


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.