PHP Class Owl\Repositories\Eloquent\TemplateRepository

Inheritance: implements Owl\Repositories\TemplateRepositoryInterface
显示文件 Open project: owl/owl

Protected Properties

Property Type Description
$template

Public Methods

Method Description
__construct ( Template $template )
create ( $template ) : Illuminate\Database\Eloquent\Model Create a new template.
delete ( $template_id ) : boolean Delete a tempalte data.
getAll ( ) : Illuminate\Database\Eloquent\Collection Get all template data.
getById ( $template_id ) : Illuminate\Database\Eloquent\Collection Get template data by id.
updateTemplate ( $template_id, $template ) : Illuminate\Database\Eloquent\Model Update a template data.

Method Details

__construct() public method

public __construct ( Template $template )
$template Owl\Repositories\Eloquent\Models\Template

create() public method

Create a new template.
public create ( $template ) : Illuminate\Database\Eloquent\Model
$template object display_title, title, tags, body
return Illuminate\Database\Eloquent\Model

delete() public method

Delete a tempalte data.
public delete ( $template_id ) : boolean
$template_id int template_id
return boolean

getAll() public method

Get all template data.
public getAll ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Builder

getById() public method

Get template data by id.
public getById ( $template_id ) : Illuminate\Database\Eloquent\Collection
$template_id int template_id
return Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Builder

updateTemplate() public method

Update a template data.
public updateTemplate ( $template_id, $template ) : Illuminate\Database\Eloquent\Model
$template_id int
$template object display_title, title, tags, body
return Illuminate\Database\Eloquent\Model

Property Details

$template protected_oe property

protected $template