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!