Answer the question
In order to leave comments, you need to log in
How to store a record in a database inside a model using ORM?
Good afternoon, tell me how to work with the database inside the model class. I use ORM eloquent
and connect the necessary classes
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Query\Builder;
class User extends Model
{
protected $table = 'users';
protected $fillable = [
'id',
'name',
'surname',
'email',
'phone',
'created_at',
'updated_at',
'is_verified',
'api_key',
'token',
'avatar',
'password'
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question