Today we will use the scopes to show the active users in our web. Although anyone can currently register, later we will add a package of Laravel that allows managing the roles and limit, depending on the role, who can post posts. And we will also format the publishing date of the posts.
Seeders make it easy to create fake test data. Exactly, what can be done with the seeders is to generate fake data and save it in the database, with this we will not have to go inserting one by one the test data in the database.
We have been talking a little bit about everything, even to certain things we can give them the design we want, but we have not explained how these JS and CSS files are included. Today we will explain how to do it and also explain a tool that has Laravel called Laravel Mix.
Laravel Mix is a tool that allows us to compile and minify our assets (supports CSS and JS preprocessors) very easily.
Continue reading “Laravel 5.4 #12 : Assets and Laravel Mix”
In a blog it is important that there is a search engine. A search engine makes easier for our visitors to find content that is of interest to them. Today we will add it to the blog that we are developing. We will see how to add two types of search engines, one simple and another full-text search.
Today we are going to add a pagination to our list of posts. We will explain how to add different types of pagination. The first type will be a simple pagination (next and previous), the second one with numbers and the last one will be a custom pagination.
Continue reading “Laravel 5.4 #10 : Pagination”
We continue to move forward with Laravel and our blog. Today we are going to explain what the policies are and we will apply them to our project.
Continue reading “Laravel 5.4 #9 : Policies”