Laravel create/show Route Doesn't Work? A Typical Mistake.
If you have a few similar GET routes, there's a danger of one overriding another.
In-depth Laravel tutorials covering advanced topics, real-world examples, and best practices.
If you have a few similar GET routes, there's a danger of one overriding another.
Collections in Laravel are "hidden gems": not everyone is using them. They are especially effective when performing MULTIPLE operations with data - so-called "chains". I've gathered 15 real-life examples from open-source Laravel projects. The goal is not only to show the Collection methods but also the practical scenarios of WHEN to use them.
If you have 10 rows of data in the initial Seeder file, but then you need to import 10 more rows when the project is already launched, what should you do? There are a few options.
Let's say you have a Login page with the language prefix in URL: `/en/login` and `/fr/login`. To show French/English texts on the Login page, you need to do these things.
There are situations when we're not sure what the columns of the DB table would be, they need to be flexible. For example, e-shop product properties: size, color, fabric, there may be more in the future. What is the best DB structure? I will show you 3 options and their performance.
Sometimes you need to add more fields to the many-to-many pivot table, and those fields may also have their own relationships.
In default Laravel, there's one constant responsible for the redirection of logged-in users. How is it used in Breeze?
To deploy assets with Vite to the live server, one of the ways is to build them locally and then push the built assets to the repository.
The default naming convention of Laravel many-to-many pivot table is xxxxx_yyyyy, where "xxxxx" and "yyyyy" are names of related tables, in singular form, in alphabetical order.
In Laravel's many-to-many polymorphic relations, there is a situation where you can't get ALL records of different models by their "parent" record. Let me explain, and show the potential solution.