This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

williamson.t.p23282
williamson.t.p23282

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

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.