abstract class BaseModel {
public function find($params){
$table = $this->$table;
//...
}
}
class User extends BaseModel {
protected $table = "users";
}
If I do:
$u = new User();
$u->find([]);
It works just because I created a new instance of the user class. but if I want to do it directly:
User::find([]);
I do not get why not to any reference to $this
How do I resolve this?