Skip to content

v0.2.0

Compare
Choose a tag to compare
@lorisleiva lorisleiva released this 05 Aug 16:48

⚠️ Middleware registration (breaking changes) In preparation of Laravel 6, the middleware registration changes slightly to follow the same API as the upcoming Job middleware.

// Before.
public function register()
{
    $this->middleware('auth');
}

// After.
public function middleware()
{
    return ['auth'];
}

Actions are now invokable as objects

// When running an action as an object.
$action = new PublishANewArticle([
    'title' => 'My blog post',
    'body' => 'Lorem ipsum.',
]);

// You can now run it like this...
$action();

// Which is equivalent to...
$action->run();