PHPackages                             coder-manjeet/laravel-contact-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. coder-manjeet/laravel-contact-form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

coder-manjeet/laravel-contact-form
==================================

A simple and customizable Laravel package to handle contact forms. This package allows you to easily manage contact form submissions, send emails, and store inquiries in the database.

v1.0.0(1y ago)01MITPHP

Since Feb 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/coder-manjeet/laravel-contact-form)[ Packagist](https://packagist.org/packages/coder-manjeet/laravel-contact-form)[ RSS](/packages/coder-manjeet-laravel-contact-form/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Contact Form
====================

[](#laravel-contact-form)

A simple and customizable Laravel package to handle contact forms. This package allows you to easily manage contact form submissions, send emails, and store inquiries in the database.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Customization](#customization)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via Composer. Run the following command in your terminal:

```
composer require coder-manjeet/laravel-contact-form
```

After installing the package, you need to publish the configuration file and run the migration to create the necessary database table.

Publish Configuration
---------------------

[](#publish-configuration)

To publish the configuration file, run the following Artisan command:

```
php artisan vendor:publish --provider="CoderManjeet\\LaravelContactForm\\ContactFormServiceProvider" --tag="contact-form-config"
```

This will create a `contact-form.php` file in your `config` directory, where you can customize the package settings.

Run Migrations
--------------

[](#run-migrations)

Next, run the migration to create the `contacts` table in your database:

```
php artisan migrate
```

This will create the table where contact form submissions will be stored.

### Add Service Provider (Optional for Laravel 5.5+)

[](#add-service-provider-optional-for-laravel-55)

If you are using Laravel 5.5 or above, the package will automatically register the service provider. For older versions, you need to manually add the service provider in your `config/app.php` file

```
'providers' => [
    // Other service providers...
    CoderManjeet\LaravelContactForm\ContactFormServiceProvider::class,
],
```

### Add Routes

[](#add-routes)

Finally, ensure that the package routes are loaded by adding the following line to your `routes/web.php` file:

```
CoderManjeet\LaravelContactForm\ContactFormServiceProvider::routes();
```

This will register the necessary routes for the contact form.

Configuration
-------------

[](#configuration)

After publishing the configuration file, you can customize the package settings by editing the `config/contact-form.php` file. This file contains various options such as email settings, form fields, and validation rules.

### Example Configuration

[](#example-configuration)

Here is an example of how you might configure the `config/contact-form.php` file:

```
return [
    'emails' => [
        'admin_email' => env('CONTACT_FORM_ADMIN_EMAIL', 'test@example.com'),
        'disable_admin_mail' => env('CONTACT_FORM_DISABLE_ADMIN_EMAIL', false),
        'disable_user_mail' => env('CONTACT_FORM_DISABLE_USER_EMAIL', false),
        'disable_mail_queue' => env('CONTACT_FORM_EMAIL_QUEUEUE', false)
    ],
    'validation_rules' => [
        'name' => 'required|string|max:255',
        'email' => 'required|email|max:255',
        'subject' => 'required|string|max:255',
        'message' => 'required|string|max:1000',
    ]
];
```

Customization
-------------

[](#customization)

### Views

[](#views)

The package includes default Blade views for the contact form and email templates. You can customize these views by publishing them to your application's `resources/views/vendor/contact-form` directory:

```
php artisan vendor:publish --provider="CoderManjeet\\LaravelContactForm\\ContactFormServiceProvider" --tag="contact-form-views"
```

### Mailables

[](#mailables)

The package includes mailables for sending emails when a contact form is submitted. You can customize these mailables by publishing them to your application's `app/Mail` directory:

```
php artisan vendor:publish --provider="CoderManjeet\\LaravelContactForm\\ContactFormServiceProvider" --tag="contact-form-mailables"
```

### Controller

[](#controller)

If you need to customize the logic for handling form submissions, you can publish the ContactFormController to your application's `app/Http/Controllers` directory:

```
php artisan vendor:publish --provider="CoderManjeet\\LaravelContactForm\\ContactFormServiceProvider" --tag="contact-form-controller"
```

### Migrations

[](#migrations)

The package includes a migration to create the contacts table. You can customize this migration by publishing it to your application's `database/migrations` directory:

```
php artisan vendor:publish --provider="CoderManjeet\\LaravelContactForm\\ContactFormServiceProvider" --tag="contact-form-migrations"
```

### Usage

[](#usage)

To use the contact form in your application, simply include the form in one of your views:

```
@include('laravel-contact-form::contact')
```

This will render the contact form. When the form is submitted, the data will be stored in the contacts table, and an email will be sent to the configured recipient.

### Customizing Form Fields

[](#customizing-form-fields)

You can customize the form fields by editing the published views. The default form includes fields for name, email, subject, and message. You can add or remove fields as needed.

### Validation

[](#validation)

The package includes default validation rules for the form fields. You can customize these rules by editing the `config/contact-form.php` file.

### Email Notifications

[](#email-notifications)

When a form is submitted, an email notification is sent to the configured recipient. You can customize the email template by editing the published views in `resources/views/vendor/contact-form/mail`.

### Contributing

[](#contributing)

Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.

### License

[](#license)

This package is open-source software licensed under the [MIT license.](https://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

563d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/86555630?v=4)[codermanjeet](/maintainers/codermanjeet)[@codermanjeet](https://github.com/codermanjeet)

---

Top Contributors

[![coder-manjeet](https://avatars.githubusercontent.com/u/190799016?v=4)](https://github.com/coder-manjeet "coder-manjeet (8 commits)")

### Embed Badge

![Health badge](/badges/coder-manjeet-laravel-contact-form/health.svg)

```
[![Health](https://phpackages.com/badges/coder-manjeet-laravel-contact-form/health.svg)](https://phpackages.com/packages/coder-manjeet-laravel-contact-form)
```

###  Alternatives

[mike42/escpos-php

PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers

2.8k2.2M27](/packages/mike42-escpos-php)[infusionsoft/php-sdk

PHP SDK for the Infusionsoft

1292.2M7](/packages/infusionsoft-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
