Last change
on this file since c433da6 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
404 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Models;
|
---|
4 |
|
---|
5 | use Illuminate\Database\Eloquent\Model;
|
---|
6 | use Illuminate\Notifications\Notifiable;
|
---|
7 |
|
---|
8 | class Category extends Model
|
---|
9 | {
|
---|
10 | use Notifiable;
|
---|
11 |
|
---|
12 | protected $table = "categories";
|
---|
13 |
|
---|
14 | protected $fillable = ["name", "color"];
|
---|
15 |
|
---|
16 | protected $casts = [
|
---|
17 | 'created_at' => 'datetime:d-m-Y',
|
---|
18 | ];
|
---|
19 |
|
---|
20 | public function post() {
|
---|
21 | return $this->hasMany(Post::class);
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.