Im trying to pull current post data for use in my component but Im running into some issues.
use RainLab\Blog\Models\Post;
public function onStart(){
$this->post = Post::where('slug', $this->param('slug'))->first();
print_r($this->post);
}
That doesnt seem to be returning anything. Am I using it correctly?
Last updated