Today we are going to continue with the second part of roles and permissions in Laravel. What we are going to do is apply the restrictions depending on if the logged user has the permission or the role needed to do a particular action. We will change the Form Request, also some conditions that are in the view of the list of posts and also modify the policy of the posts.
As I mentioned in several posts, I was going to write about how to add a role system in our project, the first post I’ll write about this will be this one. I don’t know how many parts it will have, but it will have several.
Today we will add the necessary package to be able to manage the roles and permissions of our project with Laravel.
Laravel allows us to send notifications to users through different channels (SMS, mail, etc.). In this post, we will add notifications to our project, but will be a type of notifications that will be saved in the database and will be shown in a tab in the header.
We are going to add the possibility for logged users to comment on posts.
That users can add their profile photo is a functionality that any web has. That’s why we are going to add it to our project.
Laravel has a feature called Events that allows us to fire an event and listen to it through the Listeners. To implement this feature, we will listen to the login event and save the login date to know how much of the last time a user has been logged in.