So far. we've been manually fetching a record from the database using a wildcard from the URI. However, Laravel can perform this query for us automatically, thanks to route model binding.
app/Models
directory. This means an App\Post
namespace should now be App\Models\Post
.