I can't quite understand the OOP here. What I believe is that $this or this can be used to point to the current instance of the class and has access to all non-static members. But then what is happening here:
public function store(Request $request)
{
$this->validate()
}
This code is from the controller class of the Laravel framework. I can have access to validate() method but the problem is, its not in the current class and even if its being inherited from the base or parent class, I shouldn't be able to access it through $this variable.
And later in the code I was able to use my Model like this:
$post = new Post;
Why did I call the Model Post class and not the constructor of that class?