Coder Social home page Coder Social logo

postman's Introduction

POSTMAN

Note Required PHP version >= 7.1

Obviously, you must have configured the database and Mail

What is it?

This package is for Laravel. Using the interface you can send the emails on schedule.

It's simple! You are creating a letter and sending it at just the right time!

You intrigued?

Read on!

Install

Installed via composer.

composer require agoalofalife/postman

Before you install the package, it is important to define your language.

In file config/app.php

 'locale' => 'en',

Note Out of the box en and ru.

if if your version is below laravel 5.5. insert service provider :

...
agoalofalife\postman\SheduleEmailServiceProvider::class

Next, you're executing the command:

php artisan postman:install

Now you can insert the template where you want.

It could be your administrative panel or what else.

...
  <body>
    @include('postman::app')
    ...

now you can see your interface!

postman

And last.. You need to work cron. App\Console\Kernel

 if (config('postman.switcher')) {
            $schedule->command(ParseCommand::class)->everyMinute();
        }
        

Custom Mode

Each letter has its own algorithm sending. Example :

  • Send all as BCC
  • Send all as CC For this there are routines that implement the interface
agoalofalife\postman\Contract\Mode::class

You must implement all three methods:

  • getName()
  • getDescription()
  • postEmail()

Of the first two all clear from the title. postEmail() within the logic of sending.

If something is not clear you can see examples in the source code.

Once you have implemented his mode, it is necessary to specify in the configuration file and execute the command :

php artisan postman:seed 

Config

  • You can set the column size
 'ui' => [
        'table' => [
            'id' => 60,
            'date' => 180,
            'email.theme' => 180,
            'email.text' => 400,
            'mode.name' => 140,
            'status_action_human' => 130,
            'updated_at' => 140,
            'operations' => 240,
        ]
    ]
  • List of available modes
'modes' => [
        \agoalofalife\postman\Modes\OneToAll::class,
        \agoalofalife\postman\Modes\Each::class,
    ]

Vue components

If you don't want to set using the templating Blade, it is possible to migrate a component to vue.

php artisan vendor:publish --tag=postman-components

Middleware

You can define your rules in config file.

  /*
     |--------------------------------------------------------------------------
     | Middleware
     |--------------------------------------------------------------------------
     | Set middleware
     */
     'middleware' => '',

postman's People

Contributors

agoalofalife avatar

Stargazers

Mohammad Prince avatar dandisy avatar Sergiu Ravliuc avatar

Watchers

James Cloos avatar  avatar

postman's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.