source: app/Models/Category.php@ d25ba66

Last change on this file since d25ba66 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

initial commit

  • Property mode set to 100644
File size: 404 bytes
RevLine 
[0924b6c]1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Model;
6use Illuminate\Notifications\Notifiable;
7
8class 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.