In reports or tables, you often need to show one record with all its "children" records on the same line, separated by a comma. In this tutorial, I will show you TWO ways to achieve that in Laravel.
I've seen people on forums [struggling with an error](https://laracasts.com/discuss/channels/laravel/method-illuminatevalidationvalidatorvalidatename-does-not-exist) like this: "Method Illuminate\Validation\Validator::validateName does not exist". Why does it happen, and how to fix?
Laravel Validation returns an error as a JSON response with the error messages in a strict standard format. What if you want to change it to an entirely different structure because your front-enders ask you for specific key-value pairs?
I've seen on various forums people asking why the default empty Laravel installation sometimes shows 20 MB memory usage in Debugbar without any DB queries or heavy functionality. The short answer: "Don't debug, it's normal."
By default, Laravel stores the uploaded public files in the `storage/app/public,` and you should create a so-called "symbolic link" with the Artisan command "php artisan storage:link". But what if you don't have SSH access to the Terminal and can't run this command?
Eloquent has a lot of "hidden gems". In this tutorial, let's see how we can get the latest record from the `hasMany` Relationship in five different ways.
The `Carbon` class for dates and times is a part of Laravel by default, but there's also a less-known class, `CarbonPeriod`. It can help generate the ARRAY of datetimes, often useful for report tables and calendars. In this tutorial, let's look at the 7 most practical examples of `CarbonPeriod`.
JSON columns in the database seem like a solution if you're not sure about the structure of data. But quite often, they lead to more problems in the future. In this article, I want to show both good and bad cases of using JSON columns with Laravel examples.
If you have a `hasMany` relationship and want to get the parent record with a total sum of specific children column values and order by it, here's how to do it.