Skip to content

Sohailqureshi9/Laravel_MVC_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Laravel MVC Contact App

A simple and beautiful Laravel web application built using the Model-View-Controller (MVC) pattern.
This project demonstrates clean routing, Blade templates, and form handling with database storage.

πŸš€ Features

  • 🏠 Home, ℹ️ About, and πŸ“© Contact pages
  • 🎨 Beautiful modern UI with gradient design
  • 🧭 Follows Laravel MVC architecture
  • πŸ—„ Contact form with validation and database storage
  • ⚑ Flash messages for success and validation errors
  • πŸ’Ύ Data stored using Eloquent ORM (Message model)

πŸ› οΈ Tech Stack

  • Framework: Laravel 11+
  • Language: PHP 8+
  • Database: MySQL
  • Frontend: Blade, HTML5, CSS3 (custom)
  • Icons: Material Design Icons (MDI)

πŸ“‚ Folder Structure

simpleApp/ β”‚ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ Http/ β”‚ β”‚ └── Controllers/ β”‚ β”‚ β”œβ”€β”€ PageController.php β”‚ β”‚ └── ContactController.php β”‚ β”œβ”€β”€ Models/ β”‚ └── Message.php β”‚ β”œβ”€β”€ database/ β”‚ └── migrations/ β”‚ └── create_messages_table.php β”‚ β”œβ”€β”€ resources/ β”‚ └── views/ β”‚ β”œβ”€β”€ home.blade.php β”‚ β”œβ”€β”€ about.blade.php β”‚ └── contact.blade.php β”‚ β”œβ”€β”€ routes/ β”‚ └── web.php β”‚ └── .env.example

yaml Copy code

βš™οΈ Setup Instructions

1️⃣ Clone Repository

git clone https://github.com/yourusername/laravel-mvc-contact-app.git cd laravel-mvc-contact-app 2️⃣ Install Dependencies bash Copy code composer install 3️⃣ Setup Environment Copy .env.example to .env and update database info:

cp .env.example .env php artisan key:generate Edit .env:

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_mvc_app DB_USERNAME=root DB_PASSWORD= 4️⃣ Run Migrations

php artisan migrate 5️⃣ Start the Server

php artisan serve Visit the app at πŸ‘‰ http://127.0.0.1:8000

πŸ’¬ Contact Form Functionality Submits data via POST /contact

Validates inputs (name, email, message)

Stores in messages table

Displays success message after submission

Shows validation errors if inputs are invalid

πŸ“Έ Screenshots

Home

image

About

image

Contact

image

πŸ§‘β€πŸ’» Author Muhammad Sohail πŸ“ Rawalpindi, Pakistan πŸ“§ sohailqureshii369@gmail.com πŸ”— LinkedIn

About

🎯 A simple Laravel MVC web app with Home, About, and Contact pages. The Contact page includes a styled form with validation and database storage using Laravel Eloquent ORM. Built to demonstrate routes, controllers, views, and model interaction in Laravel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages