Let me try to answer. I'm not familiar with it, I'm new to it, I hope I'm not misleading.
You can see that BusinessWork inherits Eloquent and has its own tables, operable field properties, etc.
BusinessWork::find(1) is inherited from Eloquent. It also has some common operations such as fetching all records: BusinessWork::all(), which can also be rewritten in BusinessWork.
You can take the time to go out and turn left to Baidu or right to Google to download Laravel's Eloquent ORM documentation.
hope this helps.
For example:
<?php
class BusinessWork extends Eloquent
{
}
BusinessWork::find(1); This is how table binding is implemented
Let me try to answer. I'm not familiar with it, I'm new to it, I hope I'm not misleading.
You can see that BusinessWork inherits Eloquent and has its own tables, operable field properties, etc.
BusinessWork::find(1) is inherited from Eloquent. It also has some common operations such as fetching all records: BusinessWork::all(), which can also be rewritten in BusinessWork.
You can take the time to go out and turn left to Baidu or right to Google to download Laravel's Eloquent ORM documentation.
hope this helps.
Use the class reflection mechanism to obtain the class name, and then parse it into a table name.
Any questions?
For delayed binding implementation, refer to PHP 5.3’s static