Filters result using the
where
method
public function index()
{
    $posts = Post::where('title', 'pst')->get();
    return view('posts.index')->with('posts', $posts);
}
by Valeri Tandilashvili
4 years ago
Laravel
model methods
Laravel From Scratch
0
Pro tip: use ```triple backticks around text``` to write in code fences