Add (initial): futurewalker code
This commit is contained in:
39
app/Models/Entity.php
Normal file
39
app/Models/Entity.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Entity
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @property Collection|PostEntity[] $post_entities
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Entity extends Model
|
||||
{
|
||||
protected $table = 'entities';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function post_entities()
|
||||
{
|
||||
return $this->hasMany(PostEntity::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user