I am trying to use corcel to retrieve data from wordpress in laravel. Found some usefl data on this website:
if i use like this, it show the error like this
$posts = \App\Post::published()->get(); return $posts;
BadMethodCallException in Builder.php line 2451: Call to undefined method Illuminate\Database\Query\Builder::published()
But if i use like this
$posts = \App\Post::all(); return $posts;`
it works.Help me out where am i missing to do. Thanks in advance.
Please sign in to leave a comment.