Laravel has a great database migration mechanism, but there are some things missing there. For example, what if you want your IDs start with some number, like 140001, 140002 etc?
How do you handle POST data in your store() or update() methods? Seems like a simple question, but actually there are so many options!
Laravel pagination is quite a simple thing to use, but to determine the amount of pages it makes additional query to the database, which may be a problem for bigger amount of data. And you can actually avoid it.
Imagine a situation that you have 10 records to show in Blade but you need to show them in 2 sections, five records each. There's a pretty nice trick how to do that in @foreach loop.
While seeding data, it's common to have one class for each database table. But what if there are relationships? I will show you two...
For a while many of us used to write conditional queries with "if-else". What if I told you there's a (much) better way? Easily readable and more Laravel-ish.
Let's imagine a scenario where you have an old database and re-writing codebase to Laravel. Database structure may not follow Laravel standards - created_at and updated_at fields are named differently. How can you "tell it to Laravel"?
Not Laravel related, but today encountered the situation, so sharing with you. You probably know Datatables, right? It allows to quickly search and filter the table of data. But what if user then navigates away (for Edit, for example) and then wants to go back and have the same search parameters he had before? Easy.
I've recently found out about a feature in Laravel relationship which changed the way I write code. So sharing with you.
Resource controllers are great for CRUDs, but if we use them for APIs, there are two unnecessary methods - create() and edit(), cause there are no visual forms for it. So how to remove them from routes? There are two ways.