Support the ongoing development of Laravel.io →
Architecture
Last updated 2 years ago.
0

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');
        });
.........
0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.