We are friends who love programming and we would like to help learn it and spread it to others and help solve the problems that our developers friends also face

Joined May 2022
Photos and videos
Cool Tips retweeted
How do you find this #Laravel Tip ?πŸ‘‡ Conditionally Chain Eloquent Queries with `when()` βœ… Cleaner queries βœ… Easier to maintain βœ… Perfect for optional filters Keep your controllers clean and avoid messy if statements:
3
8
29
926
Laravel tip. Cache key names as REUSABLE constants. Don't put cache key names as raw strings. If someone MISTYPES 'products.count' somewhere, cache invalidation breaks. And you won't get an error. Just stale data forever. Make it a constant on the model. Use it everywhere.
4
7
69
5,349
Cool Tips retweeted
I still see a lot of Laravel code using `count() > 0` just to check if records exist. `exists()` is more expressive, more efficient, and tells future readers exactly what you're trying to do. Small change. Better code. πŸ‘‡
2
5
29
1,666
Laravel tip. Why `@props` in Blade components matters. Forget to declare a passed-in model, and {{ $attributes->merge() }} happily serializes the ENTIRE model into your HTML. Bloated HTML size data leak. `@props` pulls it out of `$attributes`.
1
30
2,137
Cool Tips retweeted
Hey Laravel Developers πŸ‘©β€πŸ’» Oftentimes, after building an API for a client, the next thing that comes to mind is how can I quickly authenticate the client? Not to worry, if the client is making a server-to-server call to your API, you can easily add HTTP Basic Auth to your API using the Auth::onceBasic() method. The middleware below looks for the Authorization header in the form "Basic base64(username:password)" and authenticates each API request where this middleware is attached. #laravel #php
1
5
34
1,528
Cool Tips retweeted
Progress Report: May 2026 A recent security audit flagged a vulnerability. There's no evidence it was exploited, but patches are available and we strongly recommend updating. If you faced something, please share. Big respect to everyone helping make the #Laravel ecosystem safer πŸ™Œ Know MoreπŸ‘‡
1
4
19
930
Cool Tips retweeted
#Laravel Tip Native Automatic Deletion πŸͺ„ Sometimes you may want to delete old entries, you can use the Prunable Trait. No need to write custom commands
2
8
58
2,355
Cool Tips retweeted
Hey Laravel Developers We know that PHP handles memory management automatically, and objects are generally destroyed once they are no longer referenced. However, sometimes it is still better to manually unset a variable and free up memory earlier, especially when working with long-running functions or scripts. This is because a variable remains in scope until the function or script finishes execution. Even if you no longer need the variable, PHP may continue holding the memory until it goes out of scope. By using unset(), you can release that memory sooner. Check the code example below for a better understanding! #laravel #php
2
6
67
3,308
Cool Tips retweeted
#Laravel Tip Did you know... Laravel understands your relations and lets you write much cleaner codeπŸ‘‡
8
64
1,663
Cool Tips retweeted
#PHP Tip Did you know... You can destructure arrays directly in the right-hand part of a foreach loop! Give it a shot for cleaner and more readable code!
7
71
1,935
Cool Tips retweeted
#Laravel Tip Did you know... filled() is smarter than has() β€” it also checks that the value isn't null or empty.
1
8
54
1,640
Cool Tips retweeted
Hey Laravel Developers πŸ‘©β€πŸ’» Working with addresses, locations, and proximity is essential in modern web applications. Recently, I discovered a Laravel package that supports most of these features out of the box, which can help fast-track development. The package includes features like: πŸ“¦ Adding billing and shipping address relationships to any Eloquent model. ⭐ Ability to mark a particular address as primary. πŸ“ Ability to find addresses within a specific range. Please do give it a try and share your feedback. #laravel #php
3
18
133
6,727
Cool Tips retweeted
#Laravel Tip Transfer large files seamlessly using streams:
1
9
68
2,604
Laravel tip. Did you know Laravel provides `fullUrlWithoutQuery()` to generate URLs while excluding specific query parameters. Perfect for pagination links, filtering, or cleaning up URL state.
6
40
2,148
Cool Tips retweeted
12 Git commands you should know
3
106
502
13,249
Cool Tips retweeted
Some cool new stuff in this week's Laravel release. Laravel’s password validation rule can now generate an HTML `passwordrules` attribute string. Great for helping password managers like 1Password suggest valid passwords.
6
41
457
32,969
Cool Tips retweeted
#Laravel lazy() vs get() Did you know.... You can stream large datasets from the DB using lazy() β€” way more memory-efficient than get().
2
11
78
2,864
Cool Tips retweeted
#Laravel Tip Did you know... You can fetch a single column directly with value() β€” simpler & faster than first().
1
9
62
2,065
Cool Tips retweeted
I just can't live without this Arr::arrow() helper. It is just the cleanest way to handle partial JSON column updates directly from a validated request and avoid overwriting existing data. πŸ“
5
10
91
4,965
Cool Tips retweeted
PHP 8.6 is getting a built-in `SortDirection` enum πŸŽ‰ No more 'asc'/'desc' for sorting πŸ‘ SortDirection::Ascending SortDirection::Descending Laravel already supports it via Symfony’s PHP 8.6 polyfill.
9
12
106
8,069