Skip to content

Instantly share code, notes, and snippets.

@Mulkave
Created June 8, 2016 19:58
Show Gist options
  • Save Mulkave/cf5ae440204dd807a8a9c3e9b2d57a4f to your computer and use it in GitHub Desktop.
Save Mulkave/cf5ae440204dd807a8a9c3e9b2d57a4f to your computer and use it in GitHub Desktop.
<?php
namespace Directory\Foundation;
use Illuminate\Http\Request;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Foundation\Bus\DispatchesJobs;
abstract class Feature implements SelfHandling
{
use DispatchesJobs;
public function run($job, $arguments)
{
if ($arguments instanceof Request) {
$result = $this->dispatchFrom($job, $arguments, $extra);
} else {
$result = $this->dispatchFromArray($job, $arguments);
}
return $result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment