Completed
Push — master ( 509012...3eafe2 )
by David
02:34
created

PageDetail::templateDetail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace App\LaravelRestCms\Page;
2
3
use App\LaravelRestCms\BaseModel;
4
use App\LaravelRestCms\Template\TemplateDetail;
5
6
class PageDetail extends BaseModel {
7
8
	public static $searchCols = ['data'];
9
10
	/**
11
	 * The database table used by the model.
12
	 *
13
	 * @var string
14
	 */
15
	protected $table = 'page_detail';
16
17
	/**
18
	 * The attributes that are mass assignable.
19
	 *
20
	 * @var array
21
	 */
22
	protected $fillable = [];
23
24
	/**
25
	 * The attributes excluded from the model's JSON form.
26
	 *
27
	 * @var array
28
	 */
29
	protected $hidden = [];
30
31
	/**
32
	 * Joins the page_detail table
33
	 * 
34
	 * @return \Illuminate\Database\Eloquent\Relations\HasOne
35
	 */
36
	public function templateDetail()
37
    {
38
        return $this->hasMany(TemplateDetail::class, 'id', 'template_detail_id');
39
    }
40
41
}
42