Quite an often situation in real-life projects that you have to order lists by a certain condition. For example, countries/cities in alphabetical order everywhere. Is there a way to avoid adding “orderBy” every time we make a list for a dropdown? Apparently, it’s pretty easy – we can use Global Scopes.
Quick tip for you guys. What if in your project users can login not only with email but also with some other field, like “username” or “user_id” or whatever? By default Laravel allows only one field like ’email’. That’s actually easy to change.
Recently I’ve found a few interesting tools that help generate Laravel migrations automatically from your already existing database schema. In theory it looks very cool, but we decided to test them – I asked a colleague to actually try them all out with real demo-projects. How do they generate filenames and field types? Additional rules? Foreign keys? Do they actually work? Let’s take a look.
Deployment is a process of “installing” the project to the server, to make it work “in public”. Imagine software installation process of “Download -> Install -> Some configuration -> Finish -> Use”. Similar here, just not visual – it all happens with “command magic” usually.
Those who follow this blog or Twitter account know that last week I did some Laravel-based products reviews. Totally 6 of them, all in one week. I’ve published them one by one, and now it’s time to recap and talk about main conclusions, takeaways and lessons. What have I learned from those Laravel products?