Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class CreateArticleFeature extends Feature
- {
- public function handle(Request $request)
- {
- $this->run(new ValidateArticleInputForCreationJob($request->input()));
- // process cover photo
- $cover = $this->run(ProcessArticleCoverOperation::class);
- // save article
- $article = $this->run(CreateArticleJob::class, [
- 'cover' => $cover,
- 'title' => $request->input('title'),
- 'body' => $request->input('body'),
- ]);
- return $this->run(new RespondWithJsonJob($article));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement