👨💻Developer Guide
In this section you will get a brief idea of our code flow.
Last updated
In this section you will get a brief idea of our code flow.
Last updated
Note: The above image is just a screen snap of my project folder, below I have explained the project skeleton in brief.
This folder contains another subfolder, like console, exception, exports, Http, Imports, Models, Permissions, Providers.
Console - Files under this folder are responsible for managing commands.
Exception - Files under this folder contain the core exception logic, you can also add your's or modify the existing exception handling logic.
Exports - Files under this folder are responsible for managing maatwebsite exports.
Http - This folder contains several sub-folder as controller and middleware, the controller is responsible for managing business logic, and middleware acts as a middleman between request and response.
Imports - Files under this folder are responsible for managing maatwebsite imports.
Models - Files under this folder are responsible for the database transaction.
Permissions - Files under this folder contain permission-related logic.
Providers - Files under this folder contain your application service provider logic, here you can add your broadcast or new route logic.
The bootstrap
directory contains the app.php
file which bootstraps the framework. This directory also houses a cache
directory which contains framework generated files for performance optimization such as the route and services cache files. You should not typically need to modify any files within this directory.
The config
directory, as the name implies, contains all of your application's configuration files. It's a great idea to read through all of these files and familiarize yourself with all of the options available to you.
The database
directory contains your database migrations, model factories, and seeds. If you wish, you may also use this directory to hold an SQLite database.
This folder has many subfolder such as Attendance, configuration, dashboard, Employees, Holidays, Notice, Payroll, Priority, Profile, Project, Rewards, Roles, Tasks, Vacation.Let me explain each directory one by one.
Good to know: We have used nwidart laravel modules packages, so all the folders under module, will contain the following folder config, console, database, entities, http, providers, resources, routes, tests, vendor. So I will explain the only one module subfolder because the working principle is the same for others also.
Config - It contains a file named as config returns module name, you can add other data also inside the defined array.
Console - you can create your own console method by using this command php artisan test module:make-command
Database - It contains migration, factory and seeder related files.
Entities - It contains files that manage your database tranasction.
http - This folder contains several sub-folder as controller and middleware, the controller is responsible for managing business logic, and middleware acts as a middleman between request and response.
Providers - Files under this folder contain your application service provider logic, here you can add your broadcast or new route logic.
Resources - The resources
directory contains your views as well as your raw, un-compiled assets such as CSS or JavaScript. This directory also houses all of your language files.
Routes - The routes
directory contains all of the route definitions for your application. By default, several route files are included with Laravel: web.php
, api.php
Test - The tests
directory contains your automated tests. Example PHPUnit unit tests and feature tests are provided out of the box. Each test class should be suffixed with the word Test
.
Vendor - The vendor
directory contains your Composer dependencies.
You can use the below command to create your custom module and add controller, migration seeder to it.
Note: I am using the customer name as my new module name.
If you want to add customize the theme, then go to the following path resources/views/admin/layouts, here you will find the following files alert.blade.php, app.blade.php, breadcumb.blade.php, footer.blade.php, header.blade.php, sidebar.blade.php. Let me explain to you each and every file respectively.
alert.blade.php - here default alert message code is defined.
app.blade.php - this is the base of the theme file, as it is extended everywhere in the blade file.
breadcumb.blade.php - responsible for generating dynamic breadcumb.
footer.blade.php - contain footer-related code, you can modify the footer from here.
header.blade.php - contain the header-related code, you can modify header from here.
sidebar - contain sidebar-related code, you can modify sidebar from here.