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

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

tutortonym/laravel-subscriber
=============================

Laravel Subscriber allows you to quickly integrate a subscribe/newsletter form to your laravel application.

1.0.3(4y ago)06MITPHPPHP ^7.1.33|^8.0

Since Dec 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/TutorTonyM/laravel-subscriber)[ Packagist](https://packagist.org/packages/tutortonym/laravel-subscriber)[ Docs](https://tutortonym.com/packages/laravel/laravel-subscriber)[ RSS](/packages/tutortonym-laravel-subscriber/feed)WikiDiscussions master Synced 2d ago

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

laravel-subscriber
==================

[](#laravel-subscriber)

This package allows you to add a subscription/newsletter form to your laravel application without having to create everything from scratch. It also helps you protect your subscription form with Google reCAPTCHA by integrating it with simple entries to your .env file.

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

A nickname for this package is ttm-subscriber and we may refer to it that way throughout this document.

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

[](#documentation)

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

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

[](#compatibility)

This package is compatible with Laravel 5.7 and above.

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

[](#dependencies)

This package is dependent on jQuery 3 or above.

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

[](#how-to-use)

1. [Install the package](#installation)
2. [Publish the public files](#publishing-files)
3. [Add the style and script components](#adding-components)
4. [Add the form and modals components](#adding-components)
5. [Optionally, you can add attributes to the form](#form-attributes)

That is all you need to use this package. However, if you want to make use of Google Re-Captcha v2 to protect your form from spambots, you will need to complete one more step.

6. [Add the needed fields to the .env file with their corresponding values](#using-google-re-captcha)

### Installation

[](#installation)

You can install the package via composer:

```
composer require tutortonym/laravel-subscriber
```

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

### Publishing Files

[](#publishing-files)

You can publish certain files by using the artisan command vendor:publish as such:

```
php artisan vendor:publish --provider="tutortonym/laravel-subscriber" --tag="public"
```

### Adding Components

[](#adding-components)

You will have to add certain 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 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 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 Component

[](#form-component)

The form 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 field.

```

```

#### Modals Component

[](#modals-component)

The modals component adds the modal responsible for the alerts (success or fail) after submitting the form and a modal to display the re-captcha checkbox. This component can be place anywhere in the page as it is not visible until it gets triggered, but it is recommended to be placed towards the bottom of the page.

```

```

### Form Attributes

[](#form-attributes)

There are certain values that can be modified on the form by simple variables. The following list shows the variables that can be added to the form component to modify the text on the form:

- $labelText = Modifies the label shown above the input element (default: Subscribe for Special Offers).
- $inputText = Modifies the placeholder used in the input element (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 new value to each variable.

```

```

We can also add attributes to the form such as class. By giving the form a class we can add some style to it.

```

```

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

### Using Google Re-Captcha

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

If you want to protect your form from spambots using re-captcha, first you'll need Google reCAPTCHA account. Getting an account is easy, but it is outside the scope of this documentation. You can do a 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 three entries to your .env file.

```
GOOGLE_RECAPTCHA=true
GOOGLE_RECAPTCHA_SITE_KEY=****************************************
GOOGLE_RECAPTCHA_SECRET_KEY=****************************************
```

The "GOOGLE\_RECAPTCHA" entry set to true will enable all functionality to make use of Google re-captcha v2.

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

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 form and more. For a more complete list of features visit the official [documentation](#documentation).

About TutorTonyM
----------------

[](#about-tutortonym)

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 to share 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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Every ~37 days

Total

4

Last Release

1498d ago

PHP version history (2 changes)1.0.0PHP ^7.1.33

1.0.1PHP ^7.1.33|^8.0

### Community

Maintainers

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

---

Top Contributors

[![TutorTonyM](https://avatars.githubusercontent.com/u/40620740?v=4)](https://github.com/TutorTonyM "TutorTonyM (2 commits)")

---

Tags

laravelsubscribenewsletterttmtutortonymtutor tony mttm-subscribe

### Embed Badge

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

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

202832.4k6](/packages/backpack-basset)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)

PHPackages © 2026

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