Did you know about orderByRaw() in Eloquent?
Let's imagine a simple situation - you need to write an Eloquent query and order the result by the difference of two columns. Or some other calculation. Time to apply a raw query!
In-depth Laravel tutorials covering advanced topics, real-world examples, and best practices.
Let's imagine a simple situation - you need to write an Eloquent query and order the result by the difference of two columns. Or some other calculation. Time to apply a raw query!
By default, Laravel migration mechanism stores all the operations in database table migrations. Did you know that you can change it? I will show you how and why would you need it.
Another interview with an interesting Laravel-world person and about an ambitious project - this time our guest is Jason McCreary, with his latest project called Laravel Shift.
New mini-project from our Laravel Daily Team - let's test your Laravel knowledge with LaraQuiz.com! Project was created to showcase our own QuickAdmin and mostly for a local Laravel Meetup, but hey - why not share with the world, right?
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.
Recently quite a lot of web-projects started with tutorials and courses on Laravel. On of them is Laravelista, created by Mario Bašić. We decided to talk to the author and ask more details about the project and how's it going.
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.
As I mentioned in another chapter of the book, deployment of the code is a pretty complicated process - actually, not only in Laravel, in any modern robust projects. So, to make it easier - Laravel creator Taylor Otwell has built some additional tools to make it easier.
We have another interesting interview in our blog - this time I've invited Dennis Smink who recently launched a new Laravel-related project called Larabug, so we're talking about what is behind the scenes of this new idea.