This application is built using Laravel 5.7. With Laravel Form we can send form entries to the admin’s email and to the database.
You can clone or download source code project here:
INSTALLATION:
Clone the repository
1 |
git clone https://github.com/tutacare/laravel-form.git |
Switch to the repo folder
1 |
cd laravel-form/ |
Install all the dependencies using composer
1 |
composer install --prefer-dist |
Copy the example env file and make the required configuration changes in the .env file
1 |
cp .env.example .env |
Generate a new application key
1 |
php artisan key:generate |
Change your database settings in .env
1 2 3 |
DB_DATABASE=your_db_name DB_USERNAME=your_username_db DB_PASSWORD=your_password_db |
Change your mail settings in .env
Before change you must have mail trap account
Read Here for tutorial How To Send Form To Email With Laravel
1 2 3 4 5 6 7 8 |
MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=your_mailtrap_user MAIL_PASSWORD=your_mailtrap_password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=your_email@example.com MAIL_FROM_NAME=your_name |
Run the database migrations (Set the database connection in .env before migrating)
1 |
php artisan migrate |
Start the local development server
1 |
php artisan serve |
View your application in browser
You can now access the server at http://localhost:8000