Abstract presenter, timestampstrait, update api responses
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) James Brooks <james@cachethq.io>
|
||||
* (c) Joseph Cohen <joseph.cohen@dinkbit.com>
|
||||
* (c) Graham Campbell <graham@mineuk.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Presenters;
|
||||
|
||||
use CachetHQ\Cachet\Facades\Setting;
|
||||
use Illuminate\Contracts\Support\Arrayable;
|
||||
use McCool\LaravelAutoPresenter\BasePresenter as BaseLaravelAutoPresenter;
|
||||
|
||||
abstract class AbstractPresenter extends BaseLaravelAutoPresenter implements Arrayable
|
||||
{
|
||||
/**
|
||||
* The setting repository.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Config\Repository
|
||||
*/
|
||||
protected $setting;
|
||||
|
||||
/**
|
||||
* Create a incident presenter instance.
|
||||
*
|
||||
* @param object $resource
|
||||
*/
|
||||
public function __construct($resource)
|
||||
{
|
||||
parent::__construct($resource);
|
||||
|
||||
$this->setting = app('setting');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user