visit
Did you know that the get() method can accept an array with the columns which should be returned? The same thing also works with the method all().
Laravel allows you to put your application in maintenance mode using the command artisan down. While in maintenance, the application will not be accessible by the users. But did you know that you can allow access to specific IP addresses?
Very often I see developers using Auth::user()->id to retrieve the id of the authenticated user. There is a better way.
Sometimes, in 's automated tests a backup record should be not completed. For such cases, Faker has the optional() method.
When you have a relation between two tables, the column must be unsigned. To make the column unsigned, the unsigned() method is used. But there is a second way to achieve the same result.
If you need to dd() the results of a query, there are two ways.
Previously published at