A Few Tweaks and Consideration

Written by Laracasts / Original link on Apr. 6, 2021

Before we move on to the next chapter, on databases, let's make a couple tweaks to wrap up these last two sections. First, we'll remove the route constraint that is no longer required. Then, we'll consider the benefits of adding a second Post::findOrFail() method that automatically aborts if no post matching the given slug is found.


« Environment Files and Database Connections - To be or not to be found »