Image for post

1 step you have to download project copy to below code and paste in command.

composer create-project — prefer-dist laravel/laravel contact “5.8.*”

2nd go to .env folder and put database name as :- contact

Image for post

Next go to http://localhost/phpmyadmin and put database name contact and click on create

Image for post

Next step create model and migration copy below code and simply paste

php artisan make:model contact -m

Go to migration folder create_contacts_table and paste this code 👇

2021_01_28_072704_create_contacts_table.php

Next run this command

php artisan: migrate

Next go to contact model Contact.php and paste this code 👇

Contact.php

Next create controller

Php artisan make:controller ContactController -r

Go to ContactController and paste below code in ContactController.php

ContactController.php

Next go to web.php and simply paste

web.php

Next go to resources/view and create file contact.blade.php and simply paste this code

contact.blade.php

And next go to resources/view and create new file thanks.blade.php and paste below code

thanks.blade.php

Next php artisan serve

http://127.0.0.1:8000/contact

Leave a Reply