Today I saw a code where the programmer wants to update a laravel model at the same time, he wants to increment a column's value. Today, I will show you the easiest way how to increment column and update Laravel records.
If you faced the issue with laravel tests Invalid argument supplied for foreach(), this post might be helpful for you. Recently I was trying to test something, where I was facing this issue. I will write the code in details with the scenario, hope it will be helpful for you.
In the local development, we see the Laravel error page a lot. Most probably the countless time in every day.
If you ever stuck how to run a specific test in Laravel Dusk instead of all the test, this post might help you. There are probably two ways to run a specific test in Laravel dusk, by the file location and by using `--filter` keyword. Let's dig into it.
Imagine that, you have a __UserFactory__ in laravel project where the email address is `unique`. In general, you can easily add generate an email with faker like this way.
Have you ever put together Laravel Pagination and Chunk, then realize how it works? Are they same or there is a difference between them? If same, then what is the purpose of having two different options for achieving the same work, if not, then what are the fundamental difference between them. In this post, I will talk about it.
Today, I will show you a trick that might help you to depends on query builder less where you can easily implement eager loading.
Suddenly I feel to improve my knowledge about Clean architecture in PHP. As of, I started reading some books, tutorials, and screencasts. There are lots of content around the internet. I plan to write my extractions that I have learned from those sources. Hopefully, it will be helpful for you. Today, I will share in what context clean PHP architecture is suitable for your project.
Laravel has a beautiful `each` method that can help you to process a lot of models. Consider that, you have thousands of models, so, don't load them all into memory, but chunk them. Laravel `each` function will help you to figure out in this issue. Let's see how to use each function in Laravel.
Personally, I work remotely. Working remotely sounds fun, behind the scene, of course, there are many obstacles. In most of the cases, cannot be onboarding since flexibility and freedom.