Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from speccode/master
Browse files Browse the repository at this point in the history
RespondWithViewJob.php
  • Loading branch information
Mulkave authored Dec 18, 2016
2 parents 46257c9 + 20d13e6 commit 8144c21
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Domains/Http/Jobs/RespondWithViewJob.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Domains\Http\Jobs;

use Lucid\Foundation\Job;
use Illuminate\Routing\ResponseFactory;

class RespondWithViewJob extends Job
{
protected $status;
protected $data;
protected $headers;
protected $template;

public function __construct($template, $data = [], $status = 200, array $headers = [])
{
$this->template = $template;
$this->data = $data;
$this->status = $status;
$this->headers = $headers;
}

public function handle(ResponseFactory $factory)
{
return $factory->view($this->template, $this->data, $this->status, $this->headers);
}
}

0 comments on commit 8144c21

Please sign in to comment.