for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Blog\Models;
use Arcanesoft\Blog\Bases\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Category
*
* @package Arcanesoft\Blog\Models
* @author ARCANEDEV <[email protected]>
* @property int id
* @property string name
* @property string slug
* @property \Carbon\Carbon created_at
* @property \Carbon\Carbon updated_at
* @property \Carbon\Carbon deleted_at
*/
class Category extends Model
{
/* ------------------------------------------------------------------------------------------------
| Traits
| ------------------------------------------------------------------------------------------------
use SoftDeletes;
| Properties
* The database table used by the model
* @var string
protected $table = 'categories';
* The attributes that are mass assignable
* @var array
protected $fillable = [];
* Set or unset the timestamps for the model
* @var bool
public $timestamps = true;
* The attributes that should be mutated to dates.
protected $dates = ['deleted_at'];
| Relationships
* Post's relationship.
* @return \Illuminate\Database\Eloquent\Relations\HasMany
public function posts()
return $this->hasMany(Post::class);
}