Looking to hire Laravel developers? Try LaraJobs

laravel-envoy maintained by sikic

Description
Run envoy tasks from your controller
Author
Last update
2020/08/15 13:57 (dev-master)
License
Links
Downloads
863

Comments
comments powered by Disqus

Installation

composer require sikic/laravel-envoy

Configuration

php artisan vendor:publish --provider="Luka\Envoy\EnvoyServiceProvider"

Usage

This is just an example, in production, you probably want to put this in queue

<?php

namespace App\Http\Controllers;

use Luka\Envoy\Facades\Worker;

class HomeController extends Controller
{
    public function index()
    {
        return Worker::task('echo')->arguments([
            'text' => 'hello world!'
        ])->run();
    }
}