PHPackages                             tutortonym/laravel-quick-forms - 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. tutortonym/laravel-quick-forms

ActivePackage

tutortonym/laravel-quick-forms
==============================

Laravel Quick Forms allows you to quickly and easily Integrate a subscribe or a contact us form (or both) to your Laravel application with simple Blade components without having to create everything (models, migrations, controllers, validation, views, routes, etc...) from scratch with the option to protect them with Google reCAPTCHA v2.

v1.1.0(3y ago)08MITPHPPHP ^8.0

Since Apr 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/TutorTonyM/laravel-quick-forms)[ Packagist](https://packagist.org/packages/tutortonym/laravel-quick-forms)[ Docs](https://tutortonym.com/packages/laravel/laravel-quick-forms)[ RSS](/packages/tutortonym-laravel-quick-forms/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

laravel-quick-forms
===================

[](#laravel-quick-forms)

This package allows you to add a subscribe form or a contact us form (or both) to your laravel application with simple Blade components without having to create everything (models, migrations, controllers, validation, views, routes, etc...) from scratch. It also gives you the option to protect both forms with Google reCAPTCHA v2 by integrating it with Blade components as well, and entries to your .env file.

This package sends the forms via ajax calls so there is no page refresh. Due to its use of ajax calls it depends on jQuery being installed in your project.

Requirements
------------

[](#requirements)

If you want to make use of the re-captcha v2 features, you will need a Google re-captcha account. Getting a Google re-captcha account is free and easy.

Documentation
-------------

[](#documentation)

The official and more in detailed documentation for this package can be found at .

Compatibility
-------------

[](#compatibility)

This package is compatible with Laravel 9.0 and above.

Dependencies
------------

[](#dependencies)

This package is dependent on PHP 8.0 or above.

This package is dependent on jQuery 3 or above.

How to Use
----------

[](#how-to-use)

1. [Install the package](#installation)
2. [Run the migrations](#migrations)
3. [Add the components](#adding-components)
4. [Publish the public files](#publishing-files)

You can modify the form text by adding attributes to it.

5. [Adding attributes to the form](#form-attributes)

If you want to make use of Google Re-Captcha v2 to protect your forms from spambots, complet the following step.

6. [Integrating Re-Captcha to the Project](#using-google-re-captcha)

### Installation

[](#installation)

You can install the package via composer:

```
composer require tutortonym/laravel-quick-forms
```

The package will automatically register itself, and it will be ready to use.

### Running Migrations

[](#running-migrations)

This package includes its own migrations for the subscribe and cuntact us tables. All you have to do is run the migrations with the artisan command migrate as such:

```
php artisan migrate
```

### Adding Components

[](#adding-components)

You will have to add some components to your views as they are the link between all modules in this package.

#### Style Component

[](#style-component)

The style component adds the style tag to your view with the path to the corresponding stylesheet. This component must go in the head of the page.

```

```

#### Script Component

[](#script-component)

The script component adds the script tag to your view with the path to the corresponding javascript file. This component must go after the jQuery script tag, preferably at the bottom of the body.

```

```

#### Form Components

[](#form-components)

There are two form components, one for the subscribe form and the other for the contact us form.

##### Subscribe Form

[](#subscribe-form)

This component adds the form that will be used to enter the email address to subscribe to your newsletter. This component should be place where you want to show the subscribe form.

```

```

##### Contact Us Form

[](#contact-us-form)

This component adds the form that will be used to send you a message along with the user's info. This component should be place where you want to show the contact us form.

```

```

#### Modal Components

[](#modal-components)

There are two modals being used by this package, the "alert-modal" and the "re-captcha-modal". The first one is required if you want to make use of this package's native alerts. The second one is required only if you want to make use of Re-Captcha to protect any of your forms.

The modals can be included individually or as one single component.

##### Alerts Modal

[](#alerts-modal)

This component adds the modal responsible for the alerts (success or fail) after submitting the form.

```

```

##### Re-Captcha Modal

[](#re-captcha-modal)

This component adds a modal to display the re-captcha checkbox for verification before submitting the form.

```

```

##### Both Modals in a Single Component

[](#both-modals-in-a-single-component)

This component adds both the "alert-modal" and the "re-captcha-modal".

```

```

These components can be place anywhere in the page as they are not visible until they get triggered, but it is recommended to be placed them towards the bottom of the page.

### Publishing Files

[](#publishing-files)

You can publish most files from this package. Most of them are optional but there are two that are required to make the ajax calls and to style the modals. You can publish files by using the artisan command vendor:publish as such:

```
php artisan vendor:publish --tag="ttm-quick-forms-public"
```

The two files that are required to be published are:

- ttm-quick-forms.css
- ttm-quick-forms.js

You can publish these files as a group or individually. To do so you can use the following commands:

#### As a group

[](#as-a-group)

```
php artisan vendor:publish --tag="ttm-quick-forms-public"
```

#### Just the Stylesheet

[](#just-the-stylesheet)

```
php artisan vendor:publish --tag="ttm-quick-forms-style-public"
```

#### Just the Script

[](#just-the-script)

```
php artisan vendor:publish --tag="ttm-quick-forms-script-public"
```

The style sheet will publish to /public/css/vendor/TutorTonyM/quick-forms/ttm-quick-forms.css, while the script document will publish to /public/js/vendor/TutorTonyM/quick-forms/ttm-quick-forms.js.

There are many other options for publishing these and other files. For more publishing options refer to the [official documentation](#documentation)

### Form Attributes

[](#form-attributes)

There are certain values that can be modified on the forms simply by adding attributes to the form components. The sections below show the two forms with their respective available attributes.

#### Subscribe From

[](#subscribe-from)

- labelText = Modifies the label text shown above the input element. If you wish not to have a label element, simply set this variable to an empty string. (default: Subscribe for Special Offers).
- inputText = Modifies the placeholder's text used in the input element. If you wish not to have a placeholder attribute, simply set this variable to an empty string. (default: Enter your Email).
- buttonText = Modifies the text used in the submit button (default: SUBMIT).

We can modify any or all three by assigning a value to the attributes.

```

```

#### Contact Us Form

[](#contact-us-form-1)

- subjectLabelText = Modifies the label text above the subject select element. If you wish to not have a label element, simply set this variable to an empty string. (default: Reason for Message).
- subjectDefaultOptionText = Modifies the default option's text in the subject select element. If you wish to not have a default option, simply set this variable to an empty string. (default: Reason for Message).
- firstNameLabelText = Modifies the label text above the First Name input element. If you wish to not have a label element, simply set this variable to an empty string. (default: First Name).
- firstNameText = Modifies the placeholder's text used in the First Name input element. If you wish to not have a placeholder attribute, simply set this variable to an empty string. (default: First Name).
- lastNameLabelText = Modifies the label text above the Last Name input element. If you wish not to have a label element, simply set this variable to an empty string. (default: Last Name).
- lastNameText = Modifies the placeholder's text used in the Last Name input element. If you wish not to have a placeholder attribute, simply set this variable to an empty string. (default: Last Name).
- emailLabelText = Modifies the label text above the Email input element. If you wish not to have a label element, simply set this variable to an empty string. (default: Email Address).
- emailText = Modifies the placeholder's text used in the Email input element. If you wish not to have a placeholder attribute, simply set this variable to an empty string. (default: Email Address).
- messageLabelText = Modifies the label text above the Message input element. If you wish not to have a label element, simply set this variable to an empty string. (default: Message).
- messageText = Modifies the placeholder's text used in the Message input element. If you wish not to have a placeholder attribute, simply set this variable to an empty string. (default: Message).
- buttonText = Modifies the text used in the submit button (default: SUBMIT).

We can modify any or all of them by assigning a value to the attributes.

```

```

We can also add standard html attributes to the forms like id or class as such:

```

```

To learn about more advanced ways to manipulate the forms refer to the [official documentation](#documentation).

### Using Google Re-Captcha

[](#using-google-re-captcha)

If you want to protect any or all of your forms from spam-bots using re-captcha, first you'll need a Google reCAPTCHA account. Getting an account is easy, but it is outside the scope of this documentation. You can do a quick Google search and find plenty of help on this topic.

Once you have a Google reCAPTCHA account you will need to register your domain/site. If you are on development make sure to register localhost and 127.0.0.1. Again, this is outside the scope of this documentation.

Once you have registered your domain and have the appropriate keys, all you have to do is add a few entries to your .env file.

```
TTM_QUICK_FORMS_USE_GOOGLE_RECAPTCHA_ON_SUBSCRIBE_FORM=true
TTM_QUICK_FORMS_USE_GOOGLE_RECAPTCHA_ON_CONTACT_FORM=true
TTM_QUICK_FORMS_GOOGLE_RECAPTCHA_SITE_KEY=**********************************
TTM_QUICK_FORMS_GOOGLE_RECAPTCHA_SECRET_KEY=**********************************
```

The "TTM\_QUICK\_FORMS\_USE\_GOOGLE\_RECAPTCHA\_ON\_SUBSCRIBE\_FORM" entry set to true will enable Google re-captcha v2 functionality on the subscribe form. By default, this option is set to false.

The "TTM\_QUICK\_FORMS\_USE\_GOOGLE\_RECAPTCHA\_ON\_CONTACT\_FORM" entry set to true will enable Google re-captcha v2 functionality on the contact us form. By default, this option is set to false.

The other two entries "TTM\_QUICK\_FORMS\_GOOGLE\_RECAPTCHA\_SITE\_KEY" and "TTM\_QUICK\_FORMS\_GOOGLE\_RECAPTCHA\_SECRET\_KEY" will identify your domain to the Google API when making re-captcha calls.

Keep in mind that the site key and secret key entries are required to make use to re-captcha.

Also, you can have re-captcha protection enabled in one form and not the other by setting only one of the first two entries above to true.

More Advanced Settings
----------------------

[](#more-advanced-settings)

This package has a lot more settings that can be configured to your needs such as change the text on the alert and re-captcha modals, add properties to the inner elements of the forms and more. For a more complete list of features visit the [official documentation](#documentation).

About Tutor Tony M
------------------

[](#about-tutor-tony-m)

I'm a developer from the United States who creates software and websites on a daily basis. I'm passionate about what I do, and I like sharing the knowledge I possess. I share my knowledge on different platforms such as [YouTube.com/TutorTonyM](https://www.youtube.com/tutortonym) and [TutorTonyM.com](https://tutortonym.com/). You can follow me on my social media @TutorTonyM on [Facebook](http://www.facebook.com/tutortonym), [Instagram](https://www.instagram.com/tutortonym), and [Twitter](https://www.twitter.com/tutortonym).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Every ~4 days

Total

2

Last Release

1431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f764f723229fb28a100c65f9da3c5be25c96fa54cdafebe86466807116c387e9?d=identicon)[TutorTonyM](/maintainers/TutorTonyM)

---

Tags

laravelcontactsubscribenewsletterlaravel-formlaravel-contact-formttmtutortonymtutor tony mttm-subscribecoantact formttm-contactttm-contact-form

### Embed Badge

![Health badge](/badges/tutortonym-laravel-quick-forms/health.svg)

```
[![Health](https://phpackages.com/badges/tutortonym-laravel-quick-forms/health.svg)](https://phpackages.com/packages/tutortonym-laravel-quick-forms)
```

###  Alternatives

[janvince/smallcontactform

Simple but flexible multi language contact form builder with custom fields, validation and passive antispam

307.3k](/packages/janvince-smallcontactform)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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