We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 36 | class Article extends BaseModel implements Linkable |
||
| 37 | { |
||
| 38 | /* |
||
| 39 | * Laravel Deleting. |
||
| 40 | * |
||
| 41 | * @ https://laravel.com/docs/5.5/eloquent#soft-deleting |
||
| 42 | */ |
||
| 43 | use SoftDeletes; |
||
| 44 | |||
| 45 | /* |
||
| 46 | * Laravel Searchable Model. |
||
| 47 | * |
||
| 48 | * @ https://laravel.com/docs/5.3/scout#installation |
||
| 49 | */ |
||
| 50 | use Searchable; |
||
| 51 | |||
| 52 | /* |
||
| 53 | * Status conditions column. |
||
| 54 | */ |
||
| 55 | const STATUS_PUBLISHED = 1; |
||
| 56 | const STATUS_UNPUBLISHED = 0; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The table associated with the model. |
||
| 60 | * |
||
| 61 | * @var string |
||
| 62 | */ |
||
| 63 | protected $table = 'articles'; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * The attributes that are not mass assignable. |
||
| 67 | * |
||
| 68 | * @var array |
||
| 69 | */ |
||
| 70 | protected $guarded = []; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * The table date columns, casted to Carbon. |
||
| 74 | * |
||
| 75 | * @var array |
||
| 76 | */ |
||
| 77 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Attributes to exclude from the Audit. |
||
| 81 | * |
||
| 82 | * @var array |
||
| 83 | */ |
||
| 84 | protected $auditExclude = []; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return ArticleCategory|HasOne |
||
| 88 | */ |
||
| 89 | public function category() |
||
| 93 | |||
| 94 | public function creator() |
||
| 98 | |||
| 99 | public function editor() |
||
| 103 | |||
| 104 | /** |
||
| 105 | * Set the title of the article, and the slug. |
||
| 106 | * |
||
| 107 | * @param $value |
||
| 108 | */ |
||
| 109 | public function setTitleAttribute($value) |
||
| 115 | |||
| 116 | /** |
||
| 117 | * The url that is used to view this model. |
||
| 118 | * |
||
| 119 | * @return string |
||
| 120 | */ |
||
| 121 | public function route() |
||
| 132 | |||
| 133 | /** |
||
| 134 | * The name of the current model object. |
||
| 135 | * |
||
| 136 | * @return string |
||
| 137 | */ |
||
| 138 | public function name() |
||
| 142 | |||
| 143 | /** |
||
| 144 | * @param int $amount |
||
| 145 | * @return int |
||
| 146 | */ |
||
| 147 | public function incrementView(int $amount = 1) |
||
| 151 | } |
||
| 152 |