2017 © Pedro PelĂĄez
 

library newsletter

Newsletter building tool for UniNE websites

image

designpond/newsletter

Newsletter building tool for UniNE websites

  • Monday, January 22, 2018
  • by DesignPond
  • Repository
  • 2 Watchers
  • 0 Stars
  • 221 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Newsletter module for laravel 5.2

Newsletter interface builder and send via mailjet api, (*1)

!!! WARNING work in progress this is a specific package for specific content !!!, (*2)

Install

Via Composer, (*3)

``` bash $ composer require designpond/newsletter, (*4)


## Require ``` json "intervention/image": "dev-master", "inlinestyle/inlinestyle": "1.*", "maatwebsite/excel": "~2.0.0", "mailjet/mailjet-apiv3-php": "^1.1"

Usage

This package is used with Laravel 5.2 adn Mailjet API v3 Created for multiple websites of La Faculté de droit de l'Université de Neuchùtel. The content is meant to be used with arrets, analyse, categories and multi sites, (*5)

Configuration

  • Publish with php artisan vendor:publish, (*6)

    Required, (*7)

    • Assets --tag=assets
    • Migrations --tag=migrations
    • Seeders --tag=seeds

    Optionnal, (*8)

    • Views --tag=views
    • Master layout --tag=layouts
    • Config --tag=config
  • In newsletter.php define building blocs to use if you enable "groupe" you have to enable "arret", both go with another!, (*9)

  • Define the models and files/images paths.
  • Add Mailjet credentials to your .env file
  • Migrate tables and seed types with php artisan db:seed --class=TypeSeeder

Usage simple

If you want routes with prefix set it in env.js in newsletter/js, (*10)

Master layout dependencies

Javascript and css + jquery.js v2.2 + jquery-ui.js v1.11 + bootstrap.css v3 + bootstrap.js v3, (*11)

Elements to add, (*12)

In the head, (*13)

@if(isset($isNewsletter))
    @include('newsletter::Style.main', ['campagne' => isset($campagne) ? : null])
    @include('newsletter::Style.redactor')
@endif

Before end of the body, (*14)

@include('newsletter::Script.config')

@if(isset($isNewsletter))
    @include('newsletter::Script.date')
    @include('newsletter::Script.redactor')
    @include('newsletter::Script.angular')
    @include('newsletter::Script.datatables')
    @include('newsletter::Script.main')
@endif

You have to implement upload routes for wysiwyg redactor.js, (*15)

Route::post('uploadRedactor', 'UploadController@uploadRedactor');
Route::post('uploadJS', 'UploadController@uploadJS');
Route::get('imageJson/{id?}', ['uses' => 'UploadController@imageJson']);
Route::get('fileJson/{id?}', ['uses' => 'UploadController@fileJson']);

Usage with Arrets and Categories

You have to Implement ajax routes: ``` php Route::get('arret/{id}', 'ArretController@simple'); // build.js Route::get('arrets/{id?}', 'ArretController@arrets'); // build.js Route::get('categories/{id?}', 'CategorieController@categories'); // utils.js, (*16)


And configure the path to you routes for angular`in newsletter/js/env.js ```javascript // Admin url window.__env.adminUrl = 'http://dev.local/admin/'; // Base url window.__env.ajaxUrl = 'http://dev.local/admin/ajax/';
  • Newsletters list: build/newsletter
  • Subscribers: build/subscriber
  • Import subscribers: build/import
  • External email lists: build/liste

Change log

Please see CHANGELOG for more information what has changed recently., (*17)

Security

If you discover any security related issues, please email cindy.leschaud@gmail.com instead of using the issue tracker., (*18)

Credits

Cindy Leschaud, (*19)

License

The MIT License (MIT). Please see License File for more information., (*20)

The Versions