Let's take things up a notch. Beginning with a fresh Laravel installation, let's build a full role-based authorization system that allows us to dynamically grant and revoke various abilities on a per-user basis.
View the source code for this episode on GitHub.
app/Models
directory. This means an App\Post
namespace should now be App\Models\Post
.