# Laravel

First I'll make a database.

1. Make db in mysql and then change dbconnection name in .env file
    
2. run command Php artisan migrate
    
3. now first run a command to make table in database laravel-&gt; **PHP artisan make:migration create\_customer\_table**
    
4. then add all the fields required.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679254210832/ed332266-028f-4bfa-bdbc-40ff575d8cc1.png align="center")
    
    1. Then run a command **PHP artisan make:migrate**
        

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679254542603/796e1bae-d4e9-4a3e-9d98-f9962016dca7.png align="center")

Now the table is generated, form and model could be needed to insert data into our customer table.

1. ### We are creating a model.
    
    command **PHP artisan make:model customer**
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679254921026/a2d9eb84-d959-4451-8fc3-a37acb64f9c7.png align="center")
    
2. ### Creating Form,Contoller and linking M-V-C
    
    **Controller**
    
3. ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679255062787/a1de4a8f-71d6-407c-b978-09c693483386.png align="center")
    

index will be used to view form

store will be used to store data in MySQL

view will provide display for installments and stuff.

**Route File**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679255186746/4aef9d8d-2289-4525-9691-4bf272a8ad74.png align="center")

**VIEW PAGES-*FORM***

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679255287153/1cab6529-1490-4c2a-8d86-3a40b363bef9.png align="center")

**VIEW-*TABLE\[DISPLAY\]***

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679255334780/1a33da67-f9e0-4751-8358-a6cce618c37a.png align="center")

how it looks actually.

Customer page

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679256394340/5797c25f-0fb5-4aff-b563-43739bc3a134.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679257548516/fc212922-5577-4b3d-bb87-e699f23934a7.png align="center")

Installment months are hard-coded
