
Laravel Invoice Management System with Free Source Code
Laravel Invoice Management System with Source Free Source
In this article, I will learn how to create an Invoice Management System step by step, and how to download and use it for free.
Hello guys welcome back to programming with singhateh, so in this series, we're going to build the laravel invoice management system from scratch step by step so if you are new to this channel, please hit the subscribe button to subscribe to the channel and don't forget to turn on the bell notification for more upcoming videos and projects from this channel step by step.
So, let's dive into the project and see how we can able to create the project from scratch step by step
Programs |
Function |
Versions |
PHP |
Language |
7.3 | ^8.0 |
Xampp, Wamp, Laragon |
Server |
* |
Composer |
Dependency Manager |
* |
Technologies |
Descriptions |
Laravel 8.65 |
PHP framework |
Query |
Version 1.9.1 |
HTML |
Version 5 |
Bootstrap |
Version 5 |
MYSQL |
Version 5.7* |
Names |
Functionality |
URls |
Laravel UI |
To be able to create authentication and scaffold. |
Authentication - Laravel - The PHP Framework For Web Artisans |
Laravel Excel |
To export and import excel files from our project. |
Supercharged Excel exports and imports in Laravel | Laravel Excel (laravel-excel.com) |
Laravel Barryvdh DomPDF |
To print pdf files with the help of the package |
barryvdh/laravel-dompdf: A DOMPDF Wrapper for Laravel (github.com) |
NPM |
To be able to complier our SASS files. |
About the project |
Project Descriptions |
Project Name: |
Laravel Car Parking Management System |
Project Platform: |
PHP framework |
Programming Language Used: |
Laravel version 8.65 |
Project type: |
Web Application |
Developer Name: |
Alagie Singhateh |
Developer Website: |
Laratech.live |
Developer social media: |
Twitter: @singhateh1990 |
Open the terminal inside the project and enter the following command below.
Syntax:
laravel new invoice_management_system_youtube
Now, you need to wait till the project is created successfully.
After creating successfully, you have to open the project folder inside a code editor, in my case I used a visual studio code editor. You can use any other code editor all will work fine.
To be able to install laravel Ui, you need to follow the below steps.
Syntax:
composer require laravel/ui:^2.4
The above command will install laravel UI version 2.4 inside the project and you can find it inside the composer.json file. In your root directory.
After installation is completed, now we have to make the scaffolding along with the Authentication.
Syntax:
php artisan ui bootstrap --auth
As you see we use Bootstrap as the application scaffold.
Now, Run the following command to install NPM
Syntax 1: Installing npm
npm install
After installing the npm,
Now, Run the following command to complier the CSS and JavaScript files inside the project.
Syntax 2: Complieling Css and Js Files
npm run dev
After the compilation is completed, you are now ready to run your project.
Syntax 3: Run the server and visit the project inside the browser.
php artisan serve
Open .env file and configure the follow section as below syntax:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=invoice-management-system
DB_USERNAME=root
DB_PASSWORD=
List:
- Customers Resource
- Invoices Resource
- InvoiceDetail Resource
- Products Resource
- Settings Resource
php artisan make:model Customer –all
The above command will create all that we need for the customer’s resource, such as Model, Migration, Form-Request, Controller, etc.
php artisan make:model Invoice –all
The above command will create all that we need for the invoice’s resource, such as Model, Migration, Form-Request, Controller, etc.
php artisan make:model InvoiceDetail –all
The above command will create all that we need for the invoice detail’s resource, such as Model, Migration, Form-Request, Controller, etc.
php artisan make:model Product –all
The above command will create all that we need for the product’s resource, such as Model, Migration, Form-Request, Controller, etc.
php artisan make:model Setting –all
The above command will create all that we need for the setting’s resource, such as Model, Migration, Form-Request, Controller, etc.
You have to define the route as follows inside your web.php file. Located inside routes/web.php
Route::middleware(['auth'])->group(function () {
Route::get('/home',[App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::get('export/users', [UserController::class, 'export'])->name('export.users');
Route::get('export/products', [ProductController::class, 'export'])->name('export.products');
Route::get('export/customers', [CustomerController::class, 'export'])->name('export.customers');
Route::get('settings', [SettingController::class, 'index'])->name('setting.index');
Route::post('store', [SettingController::class, 'store'])->name('setting.store');
Route::resource('user', UserController::class);
Route::resource('customers', CustomerController::class);
Route::resource('products', ProductController::class);
Route::resource('invoices', InvoiceController::class);
});
After defining the routes, now we have to continue from there.
To be able to install laravel Excel, you need to follow the below steps.
Syntax:
composer require maatwebsite/excel
The above command will install Laravel Excel inside the project and you can find it inside the composer.json file. In your root directory.
You can read more about the package through their documentation.
To be able to install laravel PDF, you need to follow the below steps.
Syntax:
composer require barryvdh/laravel-dompdf
The above command will install Laravel PDF inside the project and you can find it inside the composer.json file. In your root directory.
You can read more about the package through their documentation.
Let’s create each folder structure based on what we need to make things much easier to work with. Location resources/views/
-admin
- index.blade.php
- create.blade.php
- edit.blade.php
- modal.blade.php
- table.blade.php
- tableContent.blade.php
-customers
- index.blade.php
- create.blade.php
- edit.blade.php
- modal.blade.php
- table.blade.php
- tableContent.blade.php
-product
- index.blade.php
- create.blade.php
- edit.blade.php
- modal.blade.php
- table.blade.php
- tableContent.blade.php
-invoices
- index.blade.php
- create.blade.php
- edit.blade.php
- modal.blade.php
- table.blade.php
- tableContent.blade.php
Part 1 and part 2;
Step by Step Project Installation Guide:
After finishing downloading the project, go to the next step 2.
After finishing extracting the project zip folder, go to the next step 3.
Now, in this step, you have to run some commands to recompile the project files and dependencies.
Let’s perform the commands as follows:
composer install
After the composer installation is completed, now move to the next step.
cp -r .env.example .env
if you want you can copy the file manually or by using the above command.
And configure your database credentials, so that you can able to migrate the database tables to MYSQL.
APP_NAME=Learning_Management_System
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL="http://localhost"
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=lms
DB_USERNAME= root
DB_PASSWORD=
After you’ve set up the environment, you’ll need to establish a database configuration for it. Move to the following step to create the application key.
php artisan key:generate
After you’ve created the application key, you’ll need to move to the following step to create database tables.
php artisan migrate
php artisan db:seed
After running this command laravel will populate your database tables with the columns that are present inside the migrations files for each table.
php artisan serve
The purpose of using PHP artisan serve (PHP built-in server) is just for testing and easy starting your project in a development environment.
http://127.0.0.1:8000
Thank you for reading this article, if you have anything that you wanted to ask leave your comment and we discuss it. I hope you understand a Laravel Invoice Management System with Free Source Code by now.
0 Comments