Level 88
All database columns are available as variables inside your model. So you can simple do this everywhere in your model
$this->id;
2 likes
How can I get the id of the model from the database in the model itself? In Symphony I always define a method for that. How does Laravel do that?
All database columns are available as variables inside your model. So you can simple do this everywhere in your model
$this->id;
Please or to participate in this conversation.