After getting many questions like "How do you find time to blog daily" or "Why do you do that, it's not profitable", I decided to shoot a video, openly sharing my numbers for revenue, popularity, visitors etc. So, let's talk business.
Multi-tenancy is pretty common in web-projects - when you want to give records access only for users who created those records. In other words, everyone manages their own data and don't see anyone else's data. This article will show you how to implement it in the most simple way, in single database.
In December of 2018, I've received an email from Google, saying that they are shutting down Google+ API on March 7, 2019, and that I have 3 projects that use it for Login with Google. They suggested to move from "Google+ Sign In" to "Google Sign In". Subtle difference, but new API. Luckily, it is all well covered by Laravel Socialite, and this article will show you how to use it.
I know the title sounds unclear, so let me start with an example. What would be your Eloquent query if you have birth_date field in DB an want to show how many of your users are adult 18+ years, and how many are still children? Let's take a look.
Laravel validation system is great, including auto-populating error messages. But what if you want to override the names of the :attribute parameter values? Here's a simple example.
A quick review of Laravel Wink by Mohamed Said. It provides a really pleasant writing experience, but is it good for actual fully-featured blog project? Let's take a look.
API-based projects are more and more popular, and they are pretty easy to create in Laravel. But one topic is less talked about - it's error handling for various exceptions. API consumers often complain that they get "Server error" but no valuable messages. So, how to handle API errors gracefully? How to return them in "readable" form?