ไม่พบผลลัพธ์สำหรับ "#laraveltip"

💡 Laravel Tip Use when() in your Eloquent queries to conditionally apply clauses — clean & readable! This keeps your code elegant and avoids messy if conditions around your queries. #laraveltip #laravel #php

amit_m13's tweet image. 💡 Laravel Tip

Use when() in your Eloquent queries to conditionally apply clauses — clean & readable!

This keeps your code elegant and avoids messy if conditions around your queries.

#laraveltip #laravel #php

#LaravelTip Str::repeat() creative use cases - I love it

Here are some creative use cases for Laravel’s string repeat helper. What have you used it for in the past?



Did you know you don’t need to use both @if and @foreach to show a list in Laravel? Just use @forelse — it shows the items and handles the empty message too. So much cleaner! #laravel #laraveltip #php

amjpdev's tweet image. Did you know you don’t need to use both @if and @foreach to show a list in Laravel? Just use @forelse — it shows the items and handles the empty message too. So much cleaner!

#laravel #laraveltip #php

#LaravelTip: Want to automatically clean up old records from your database? Use the Prunable trait! No need for custom Artisan commands — Laravel handles it for you. Example: Let’s say you want to delete users who haven’t logged in for over a year:

TheAlienEmerson's tweet image. #LaravelTip: Want to automatically clean up old records from your database? Use the Prunable trait!
No need for custom Artisan commands — Laravel handles it for you. 

Example:

Let’s say you want to delete users who haven’t logged in for over a year:

#LaravelTip: If you want to reuse the same test with different data, consider utilizing data sets 👇

nagiworks's tweet image. #LaravelTip: If you want to reuse the same test with different data, consider utilizing data sets 👇

#LaravelTip: Ever encountered those rare but pesky unstable tests in your tests? Pest's handy "repeat" feature is perfect for catching those rate failures, even when they only happen once in a blue moon on your CI/CD. 🚀

nagiworks's tweet image. #LaravelTip: Ever encountered those rare but pesky unstable tests in your tests? Pest's handy "repeat" feature is perfect for catching those rate failures, even when they only happen once in a blue moon on your CI/CD. 🚀

#LaravelTip: Unlock the power of Laravel Factories with the overlooked recycle() method. - Boost test speed by 10x. - Dive deep into complex scenarios. - Save time on data setup before testing.

nagiworks's tweet image. #LaravelTip: Unlock the power of Laravel Factories with the overlooked recycle() method.

- Boost test speed by 10x.
- Dive deep into complex scenarios.
- Save time on data setup before testing.

#LaravelTip: Level up your testing game with PHP Faker in Laravel! Create nullable data with just the right touch of randomness, control it from 0% to 100%!

nagiworks's tweet image. #LaravelTip: Level up your testing game with PHP Faker in Laravel! Create nullable data with just the right touch of randomness, control it from 0% to 100%!

#LaravelTip: Laravel 11 finally introduces a method to test "failed," "released," and "deleted" queue jobs! This is so awesome—I had to take difficult routes to achieve this before!

nagiworks's tweet image. #LaravelTip: Laravel 11 finally introduces a method to test "failed," "released," and "deleted" queue jobs!

This is so awesome—I had to take difficult routes to achieve this before!

#LaravelTip: Laravel's "preventStrayRequests()" method stops actual requests during testing, useful for both third-party and local APIs. Tests may pass locally but fail in CI, where only the service under test is active, causing issues with unavailable APIs.

nagiworks's tweet image. #LaravelTip: Laravel's "preventStrayRequests()" method stops actual requests during testing, useful for both third-party and local APIs. Tests may pass locally but fail in CI, where only the service under test is active, causing issues with unavailable APIs.

#LaravelTip: Boost security and follow best practices by returning a 404 instead of a 403 during validation. 👇

nagiworks's tweet image. #LaravelTip: Boost security and follow best practices by returning a 404 instead of a 403 during validation. 👇

#LaravelTip: Magical helper yet provides a lot of value ... When you want to "Cache" a result of something during the request cycle and use it in multiple places.

nagiworks's tweet image. #LaravelTip: Magical helper yet provides a lot of value ...
When you want to "Cache" a result of something during the request cycle and use it in multiple places.

#LaravelTip: Laravel v11.27.1 introduced a new service provider method called "optimizes". You can now define commands to run with the "optimize" and "optimize:clear" commands, such as "queue:restart" or other custom commands 🚀

nagiworks's tweet image. #LaravelTip: Laravel v11.27.1 introduced a new service provider method called "optimizes".

You can now define commands to run with the "optimize" and "optimize:clear" commands, such as "queue:restart" or other custom commands 🚀

#laraveltip: You might want to apply global headers to all outgoing requests. For example, a global user agent can help identify your app's requests in other services or third-party APIs. Laravel already supports request and response middleware to achieve this 🚀

nagiworks's tweet image. #laraveltip: You might want to apply global headers to all outgoing requests. For example, a global user agent can help identify your app's requests in other services or third-party APIs. Laravel already supports request and response middleware to achieve this 🚀

#laravelTip: Keep your URLs/Services clean and easy to maintain!

nagiworks's tweet image. #laravelTip: Keep your URLs/Services clean and easy to maintain!

#LaravelTip: Finally, Retry Concurrent Requests Stuck with failed concurrent requests in Laravel 10 and earlier? Not anymore! Laravel 11's got your back. 🚀

nagiworks's tweet image. #LaravelTip: Finally, Retry Concurrent Requests

Stuck with failed concurrent requests in Laravel 10 and earlier? Not anymore! Laravel 11's got your back. 🚀

#LaravelTip: Eloquent API resources usually come wrapped in a "data" object—but what if you want to strip away that layer? Laravel's "withoutWrapping" method lets you do just that. 🚀

nagiworks's tweet image. #LaravelTip: Eloquent API resources usually come wrapped in a "data" object—but what if you want to strip away that layer? Laravel's "withoutWrapping" method lets you do just that. 🚀

#LaravelTip: Powered by Guzzle, the Laravel HTTP Client offers detailed request insights—track total time, download speed, and more! 🚀

nagiworks's tweet image. #LaravelTip: Powered by Guzzle, the Laravel HTTP Client offers detailed request insights—track total time, download speed, and more! 🚀

#LaravelTip: Auto-serialization of Eloquent models in jobs can lead to a ModelNotFoundException if they're deleted before processing. Avoid the hassle by setting deleteWhenMissingModels to true and seamlessly discard those jobs! 🚀

nagiworks's tweet image. #LaravelTip: Auto-serialization of Eloquent models in jobs can lead to a ModelNotFoundException if they're deleted before processing. Avoid the hassle by setting deleteWhenMissingModels to true and seamlessly discard those jobs! 🚀

Love the new construct promotion with #PHP 8 #laravel #laraveltip

magarrent's tweet image. Love the new construct promotion with #PHP 8

#laravel #laraveltip

🚀 #LaravelTip Assert Soft Delete in Laravel Tests!

h_ik04's tweet image. 🚀 #LaravelTip 
Assert Soft Delete in Laravel Tests!

#TIL How to calculate the age using a date in Laravel or using Carbon. #LaravelTip #PHPTip #dev

victoryoalli's tweet image. #TIL How to calculate the age using a date in Laravel or using Carbon.

#LaravelTip #PHPTip #dev

#LaravelTip Add a default order to an Eloquent has many relationship. cc @laravelnews

Sileence's tweet image. #LaravelTip Add a default order to an Eloquent has many relationship. cc @laravelnews

#LaravelTip Use only one argument when calling orderBy* in @laravelphp query builder.

Sileence's tweet image. #LaravelTip Use only one argument when calling orderBy* in @laravelphp query builder.

Laravel Tip: When you have a relationship and you don't want to return a null value you can use withDefaults like in this example. #laravel #laraveltip

victoryoalli's tweet image. Laravel Tip: When you have a  relationship and you don't want to return a null value you can use withDefaults like in this example.
#laravel #laraveltip

I've just tried @laravelshift to upgrade Laravel from 8 to 9... Simply awesome #Laravel #laraveltip

magarrent's tweet image. I've just tried @laravelshift to upgrade Laravel from 8 to 9...
Simply awesome

#Laravel #laraveltip

#laraveltip The DB and Eloquent Query Builder classes contain a `pluck` method. So…

pstephan1187's tweet image. #laraveltip The DB and Eloquent Query Builder classes contain a `pluck` method. So…

⚙️ #LaravelTip: Elevate your team-based access control game with the 'BelongsToTeam' trait! 🛡️ ✅ Seamlessly tie records to user's teams ✅ Apply global & local scopes for precise data filtering ✅ Streamline team relationships Empower your #Laravel app's team management! 💪🥂

MrPunyapal's tweet image. ⚙️ #LaravelTip: Elevate your team-based access control game with the 'BelongsToTeam' trait! 🛡️

✅ Seamlessly tie records to user's teams
✅ Apply global & local scopes for precise data filtering
✅ Streamline team relationships

Empower your #Laravel app's team management! 💪🥂

With @laravelphp v9 you can use Laravel Scout (Search) with database driver. No more where likes! #laravel #laraveltip

magarrent's tweet image. With @laravelphp v9 you can use Laravel Scout (Search) with database driver. No more where likes!

#laravel #laraveltip

💡Combine Form Requests, Policies and implicit model binding to authorize actions #LaravelTip

Sileence's tweet image. 💡Combine Form Requests, Policies and implicit model binding to authorize actions #LaravelTip

Collections can be a powerful tool for cleaning up your code. #laraveltip #cleancode

GlennKimbleJr's tweet image. Collections can be a powerful tool for cleaning up your code. #laraveltip #cleancode

💡 Did you know you can use dependency injection in the rules method of @laravelphp form requests? It’s a nice spot for injecting your custom invokable validation rules. #Laravel #LaravelTip

martinbean's tweet image. 💡 Did you know you can use dependency injection in the rules method of @laravelphp form requests? It’s a nice spot for injecting your custom invokable validation rules.
#Laravel #LaravelTip

🚀 #LaravelTip: Boost database migrations with hasColumn and hasTable! 🛠️ Ensure your tables and columns exist before modifying them. Smooth migrations for a smoother development journey. 💻🔧 You may use them outside of migrations if you want 🧐 #Laravel #PHP 💡

MrPunyapal's tweet image. 🚀 #LaravelTip: Boost database migrations with hasColumn and hasTable! 🛠️ 

Ensure your tables and columns exist before modifying them. Smooth migrations for a smoother development journey. 💻🔧 

You may use them outside of migrations if you want 🧐

#Laravel #PHP 💡

#laraveltip Did you know that #laravel Form Requests have an undocumented method where you can perform logic before the validation takes place? It's a great spot to perform things like input santization:

pstephan1187's tweet image. #laraveltip Did you know that #laravel Form Requests have an undocumented method where you can perform logic before the validation takes place? It's a great spot to perform things like input santization:

📣📣 Did you know you can apply multiple states in your factories? 🔥🔥 #laravel #laravelTip

bak_1024's tweet image. 📣📣 Did you know you can apply multiple states in your factories? 🔥🔥  #laravel #laravelTip

🤔 Did you know that you can define default values for route parameters in #Laravel? 🛣️ This is a great way to provide fallback values for optional parameters in your web.php or api.php files. 🔥 #laraveltip

MrPunyapal's tweet image. 🤔 Did you know that you can define default values for route parameters in #Laravel? 🛣️ 

This is a great way to provide fallback values for optional parameters in your web.php or api.php files. 🔥 

#laraveltip

🚀 #LaravelTip: Preview Mailables Easily 💌 Big thanks to Freek Van Der Harten for sharing this invaluable Laravel tip! 🙌💡 Check it out and level up your Laravel development game. 🎯 #Laravel #php ‼️

MrPunyapal's tweet image. 🚀 #LaravelTip: Preview Mailables Easily 💌

Big thanks to Freek Van Der Harten for sharing this invaluable Laravel tip! 🙌💡

 Check it out and level up your Laravel development game. 🎯

#Laravel #php ‼️

Loading...

Something went wrong.


Something went wrong.


United States Trends