28 lines
460 B
PHP
28 lines
460 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MorphLegend extends Model
|
|
{
|
|
public $incrementing = false;
|
|
|
|
public $table = 'morph_legend';
|
|
|
|
public $primaryKey = 'morph';
|
|
|
|
public $visible = [
|
|
'morph',
|
|
'description',
|
|
];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function words()
|
|
{
|
|
return $this->hasMany(Word::class, 'morph', 'morph');
|
|
}
|
|
}
|