Controller:
public function getSpecificPost($id)
{
$returnArray = with(new Posts)->getSpecificPost($id);
print_r($returnArray);
}
?>
Model:
public function getSpecificPost($post_id)
{
//exit($post_id);
return DB::table('posts')->where('id', $post_id)->toSql();
}
?>
If I uncomment the exit, it gives me a 1 as return. When I comment the exit I of course get a query, the query is as follows:
select * from
postswhere
id= ?
Its Laravel Framework, help me out please!