
Laravel Shots
@LaravelShots
Laravel tips packed in a simple tweet. Sending 3 high-quality laravel tips and resources to your inbox every month. By @introwit
คุณอาจชื่นชอบ
Really digging Laravel's `firstOr()` method! laravel.com/docs/8.x/eloqu…

A @Laravelphp tip from Kirschbaum senior developer Rob Fonseca @therobfonz If you need to ensure a Artisan command runs after another one completes, use the then() method. #laravel #webapplicationdevelopment

🤤Remove those conditionals around code responsible to dispatch jobs and let @laravelphp make it cleaner for you!

So beautiful! 🤤
In @laravelphp, the "partition()" method may be combined with the array destructuring PHP feature to separate elements that pass a given truth test from those that do not. 🖖🏻

😧 Woah! 🏃♂️ _runs to refactor the test suite_ 🏃♂️
🔥 One of my favourite testing helpers is a `login` method on the base `TestCase` class. Perfect for quickly creating a `User` and logging them in, as well as customising the `UserFactory` via a callback function. gist.github.com/ryangjchandler…

💥 Bookmark this one 👇
This is a bunch of options that you can use to make your code shorter, cleaner, and readable. by using the framework's powerful features you can always do the same behaviors with shorter code. #laravel 💡💡

Handy 🤩
Sometimes I just need a quick password hash: `php artisan tinker --execute="echo bcrypt('password')" | pbcopy`
🔥 Gotta love #PHP 8.0’s null safe operator! Demo: spatie.be/videos/front-l… You can use it instead of @laravelphp’s handy `optional` helper.

Now dispatch jobs from your db transactions without worrying 🔥
🤓 TIL about the "ping" attribute on <a> tags, which will send a POST request to the given URLs when the anchor is clicked. 🔗 developer.mozilla.org/en-US/docs/Web…

🧪 PhpStorm Tips & Tricks #27 - Toggle Search Scope I hope you already know your shortcuts for specific searches. ( files, classes, etc.) One little trick here is if you press the shortcut again it toggles the scope of the search between "Project Files" and "All Files" 🔍
Wait what 🤯🤑
🔥 You may know that you can query against JSON columns using the `column->key` syntax in @laravelphp, but I just learned you can use the same syntax in your tests when asserting that the database has certain data!

🔥🔥🔥
TIL 😍
Did you know that you can use array_filter oder collect()->filter() without any arguments to remove empty values? A nice way to quickly get rid of optional data in API requests payloads.

So cool @lizziepika⚡️Supercharge your zsh workflow ⚡️
🤯 I just learnt about the "take" command and "Ctrl+Q" for parking a command. twilio.com/blog/zsh-trick…
Neat 🧼
Adding a simple `redirectMap` macro to the @laravelphp router can help you clean up your routes file if you have lots of redirects.

PSA: Laravel <= 8.4.2 has vulnerability (CVE-2021-3129) allowing someone to put a crypto miner on your server if you have DEBUG mode on. reddit.com/r/laravel/comm…
You need to constantly check if a user is an admin on your Laravel views? Create an "admin" directive and save some extra lines of code every time:

🔥 TIL (or re-learned) that the `pluck` method on a @laravelphp collection accepts a second parameter to specify how you'd like the collection keyed. Super handy in certain cases!

United States เทรนด์
- 1. Good Saturday 26.2K posts
- 2. Neto 21.4K posts
- 3. Garnacho 13.1K posts
- 4. No Kings 424K posts
- 5. Chalobah 4,489 posts
- 6. #SaturdayVibes 3,612 posts
- 7. Acheampong 4,666 posts
- 8. Dork Cult Protest Day 1,088 posts
- 9. #Caturday 2,856 posts
- 10. #NFOCHE 16.1K posts
- 11. Estevao 10.3K posts
- 12. Lavia 7,064 posts
- 13. Forest 82.7K posts
- 14. Joao Pedro 7,938 posts
- 15. Emiru 12.3K posts
- 16. Massie 38.7K posts
- 17. Guiu 3,876 posts
- 18. #saturdaymorning 1,752 posts
- 19. Ohtani 241K posts
- 20. Ange 18.7K posts
คุณอาจชื่นชอบ
-
Laravel News Links
@LaravelLinks -
MadeWithLaravel
@MadeWithLaravel -
Livewire
@LaravelLivewire -
The Laravel Podcast
@LaravelPodcast -
Laravel Idea
@laravel_idea -
Larajobs
@laraveljobs -
Laravel.io
@laravelio -
Spatie
@spatie_be -
Povilas Korop | Laravel Courses Creator & Youtuber
@PovilasKorop -
Certification for Laravel
@LaravelCert -
Bobby Bouwmann
@bobbybouwmann -
Laracon EU
@LaraconEU -
Barry vd. Heuvel
@barryvdh -
Shift
@laravelshift -
Jason McCreary
@gonedark
Something went wrong.
Something went wrong.