Laravel Pro Tips
🔥 Laravel Tip: Auto-completion in artisan commands.
When you prompt a user for input, you can use the `anticipate` method to auto-complete possible responses.
💡If you ever need to run processes from Laravel such as Git commands or OS-related commands, check out the Symfony Process component.
It’s awesome! Let’s see some examples.
One of the nice little things we do is modify our Laravel schedule so that every command is run in the background, without overlapping.
We've got ~80 scheduled commands, so running in the background ensures they don't pile up.
Use the then() method to ensure an Artisan command runs when another one completes. A tip from @therobfonz. #PHP #laravel #webapplicationdevelopment
🌶️ #Laravel Tip: Inside an 𝘼𝙧𝙩𝙞𝙨𝙖𝙣 𝘾𝙤𝙢𝙢𝙖𝙣𝙙, you can execute bash scripts using the 𝙚𝙭𝙚𝙘() function.
Here's an example with an explanation 🌟
Bilal Haidar | Laravel Enthusiast
Laravel tip of the day: if you have an Artisan command, and you want to launch another command inside of it, suppressing any potential messages/prompts it may have, use $this->callSilent()
Example from Laravel Jetstream: https://t.co/cpSacILxIk
Povilas Korop | Laravel Youtuber & Content Creator
🔥 #Laravel Tip: The task scheduler isn’t just a place where you set a command and time. It can do so much more, like emailing output on error, or pinging urls. Check it out.
Matt Kingshott 🏝
No articles were found.