Completed
Push — master ( 2b6acf...5f05b1 )
by Christopher
03:20
created

Category::posts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Chriscreate\Blog;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Category extends Model
8
{
9
    protected $table = 'categories';
10
11
    protected $primaryKey = 'id';
12
13
    public $guarded = [];
14
15
    public $timestamps = true;
16
17
    public function posts()
18
    {
19
        return $this->hasMany(Post::class);
20
    }
21
}
22