2017 © Pedro Peláez
 

library laravel-newsletter

A Laravel 4 Package for adding newsletter signup (and unsubscribe) functionality to a web site

image

tailored/laravel-newsletter

A Laravel 4 Package for adding newsletter signup (and unsubscribe) functionality to a web site

  • Tuesday, January 7, 2014
  • by codeyash
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Newsletter Signup

A Laravel 4 Package for adding newsletter signup (and unsubscribe) functionality to a web site, (*1)

Features

  • Partials for a signup and an unsubscribe form, that you can include in your own views
  • Controller actions to handle the submissions of the forms, which can handle normal (redirects to previous page), or AJAX requests (responds with JSON with status code and message)
  • Translation approach for customising labels, buttons, feedback messages and validation errors
  • Currently only supports saving to a database through a supplied Eloquent model (migration included), but will hopefully be extended to support mailing list API services in future
  • Includes a FrozenNode/Laravel-Administrator config file with Download Signups CSV and Download Unsubscribes CSV buttons. You can filter by dates on the created_at and deleted_at fields to get newly created and newly deleted emails to upload new subscriptions and unsubscriptions to your mailer
  • Twitter bootstrap compatible markup and class names for the forms
  • Unsubscribing has the affect of deleting (soft delete) the email address from the signups table
  • Re-subscribing has the affect of restoring (restore from soft delete) the email address in the signups table

Installation

Add the following to you composer.json file, (*2)

"fbf/laravel-newsletter-signup": "dev-master"

Run, (*3)

composer update

Add the following to app/config/app.php, (*4)

'Fbf\LaravelNewsletterSignup\LaravelNewsletterSignupServiceProvider'

Publish the config, (*5)

php artisan config:publish fbf/laravel-newsletter-signup

Run the migration, (*6)

php artisan migrate --package="fbf/laravel-newsletter-signup"

Optionally copy the administrator config to your administrators model config directory, if you have one, (*7)

Configuration

Coming soon, (*8)

Usage

There is a route and a view supplied for rendering both the signup and unsubscribe forms, and you can configure the actual view and the actual uri in the config file., (*9)

However, you will most likely want to just @include one of the partials somewhere in your existing views, for example:, (*10)

@include('laravel-newsletter-signup::signup')

or, (*11)

@include('laravel-newsletter-signup::unsubscribe')

This will render the sign up or the unsubscribe form., (*12)

Administrator

You can use the excellent Laravel Administrator package by frozennode to view and download your signups and unsubscribes., (*13)

http://administrator.frozennode.com/docs/installation, (*14)

A ready-to-use model config file for the Signup model (newsletter.php) is provided in the src/config/administrator directory of the package, (*15)

The Versions

07/01 2014

v0.1.0

0.1.0.0

A Laravel 4 Package for adding newsletter signup (and unsubscribe) functionality to a web site

  Sources   Download

MIT

The Requires