-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.php
More file actions
52 lines (46 loc) · 1.01 KB
/
Project.php
File metadata and controls
52 lines (46 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Project
*
* @package App\Models
*
* @property string name
* @property string description
* @property string image
* @property string website
* @property string github
* @property bool isSchool
* @property int category_id
* @property Category category
*
* @mixin \Illuminate\Database\Query\Builder
* @mixin \Illuminate\Database\Eloquent\Builder
*/
class Project extends Model
{
use SoftDeletes;
protected $fillable = [
'name',
'description',
'image',
'website',
'github',
'isSchool',
'category_id',
'onMainPage',
];
protected $hidden = [
'id',
'created_at',
'updated_at',
'deleted_at',
];
public function category(): BelongsTo
{
return $this->belongsTo(Category::class);
}
}