1 | <?php namespace jlourenco\comments\Models; |
||
8 | class Comment extends Model |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * The database table used by the model. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $table = 'Comment'; |
||
17 | |||
18 | /** |
||
19 | * The attributes that are mass assignable. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $fillable = ['comment']; |
||
24 | |||
25 | /** |
||
26 | * To allow soft deletes |
||
27 | */ |
||
28 | use SoftDeletes; |
||
29 | |||
30 | use Creation; |
||
31 | |||
32 | /** |
||
33 | * The User model name. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected static $usersModel = 'jlourenco\base\Models\BaseUser'; |
||
38 | |||
39 | /** |
||
40 | * Returns the user model. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public static function getUsersModel() |
||
48 | |||
49 | /** |
||
50 | * Sets the user model. |
||
51 | * |
||
52 | * @param string $usersModel |
||
53 | * @return void |
||
54 | */ |
||
55 | public static function setUsersModel($usersModel) |
||
59 | |||
60 | public function writter() |
||
64 | |||
65 | /** |
||
66 | * Get all of the owning entity models. |
||
67 | */ |
||
68 | public function entity() |
||
72 | |||
73 | /** |
||
74 | * Get the user's first name. |
||
75 | * |
||
76 | * @param string $value |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getCreatedByAttribute($value) |
||
88 | |||
89 | } |
||
90 |