Lists all records of the model ordered by
title
descending
$posts = Post::orderBy('title', 'asc')->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