@laravelphp recently introduced a `sole` method which retrieve's the matching record or throws an exception if more than one record matches.

Laravel

You can programmatically login a user without knowing their credentials in laravel using the Auth facade. #Laravel #php #webdev #webdevelopment #Backend #LaravelPHP

Laravel

worried your laravel scheduled commands might be failing? 💡You can automatically send output of scheduled commands to any email address as shown below.💡 #Laravel #php #webdev #webdevelopment #Backend #LaravelPHP #laraveltips #cli #commandline #cronjobs

Laravel

Often, Laravel developers make a lot of database queries without realizing. 💡A simple code refactor as below can highly improve the application performance. #Laravel #PHP #webdev #webdevelopment #backend #LaravelPHP #laraveltips #laravelreading #eloquent #databases

Laravel

💡If you are making more than one call to cache server in a local scope, merge them together to save additional calls. 👀Keep an eye on the length of each cache item and total no of cache items. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips #laravelreading

Laravel

🤔Have you ever thought to perform a quick operation on an eloquent model without firing model events? 🔥Below code demonstrates how you can temporarily disable model events. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips #console

Laravel

In Laravel, If an application is running in console, you can print custom error messages to console when an exception is thrown. 💡Simply override the renderForConsole method in your exception handler. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips #console

Laravel

🔥Laravel eloquent has a method which lets you mass assign attributes without defining them in the fillable array. 👀You should NEVER use this method with unsanitized user input. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips #database

Laravel

If a Laravel app is running under auto scaling group, we often create a separate server to handle scheduler. 💡This is to avoid running scheduled commands more than once. 🔥But, Laravel already has a method to run a command only on one server. #Laravel #PHP #laraveltips

Laravel

Laravel has an optional helper method which makes it easy to retrieve properties of an object when the object can be null or property doesn't exists on the object. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips #laravelreading

Laravel

Laravel scheduled commands can be ran as a different system user than the user who is running the scheduler. 💡 For example, your scheduler might be running as a `forge` user. But you can run a scheduled command as different user. #Laravel #PHP #webdev #laraveltips

Laravel

You can disable a specific @laravelphp command based on custom logic. 💡The below examples disables the command in production environment. #Laravel #PHP #webdev #webdevelopment #backend #laraveltips

Laravel

The tweet will be reviewed and posted as soon as possible

{{ newSnippetForm.errors.url[0] }}

{{ newSnippetForm.errors.categories[0] }}