create: make a model for generate text to save on database
This commit is contained in:
parent
b62c990ae6
commit
fbfc2568f8
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Literacy;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class LiteracyGeneratedText extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'literacy_generated_texts';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'user_id',
|
||||||
|
'generate_text',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function teacher()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\User::class, 'user_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user