Get published blog by id.
public findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | |
||
$id | integer | |
return | Illuminate\Database\Eloquent\Collection | |
/** * Show blog. * * /blogs/{id} get * * @param integer $id * * @return \Illuminate\View\View */ public function show($id) { $blog = $this->blogs->findPublishedById($id); return view('blogs.show', compact('blog')); }