Laravel Eloquent Select Column as Alias

If you’re like me and like to use select statements to return specific columns. You’ll be happy to know that Eloquent allow you to use select column as alias just like in SQL. Which can be make things a breeze, depending on what you are doing. Remember to use the dot syntax to specify a … Read more

Laravel Case Insensitive Model Relationships

Normally, for case insensitive where queries, you can use the ‘ILIKE’ operator. But if you’re linking a prepopulated dataset, there’s a chance where a foreign key string doesn’t quite match another table’s key. There’s not too much info on getting case insensitive relationships working other than digging into the database dictionary and building your own … Read more