Channel: Laravel News
Validate URLs Effectively with Laravel's Str::isUrl Method https://laravel-news.com/str-isurl
Laravel News
Validate URLs Effectively with Laravel's Str::isUrl Method - Laravel News
Laravel's Str::isUrl method provides flexible URL validation with optional protocol restrictions. This utility simplifies verifying URL format and security requirements, making it ideal for form validation, webhook registration, and social media link verification…
"In Array Keys" Validation Rule Added in Laravel 12.16 https://laravel-news.com/laravel-12-16-0
Laravel News
"In Array Keys" Validation Rule Added in Laravel 12.16 - Laravel News
The Laravel team released v12.16.0, with a fluent Rule::contains() validation rule, an "in_array_keys" validation rule, a new Arr::hasAll() method, and more.
Compare Collection Keys with Laravel's diffKeys Method https://laravel-news.com/collection-diffkeys
Laravel News
Compare Collection Keys with Laravel's diffKeys Method - Laravel News
Laravel's diffKeys method identifies collection differences based on keys rather than values, enabling precise structural comparisons. This utility excels in configuration management, permission auditing, and feature flag synchronization where key presence…
ElasticLens: Eloquent-Powered Elasticsearch for Laravel https://laravel-news.com/elasticlens-eloquent-powered-elasticsearch-for-laravel
Laravel News
ElasticLens: Eloquent-Powered Elasticsearch for Laravel - Laravel News
ElasticLens is a Laravel package that integrates Elasticsearch with Eloquent models. It provides advanced search capabilities while maintaining Laravel's familiar syntax.
Verify Nested Relations Efficiently with Laravel's Enhanced relationLoaded Method https://laravel-news.com/relationloaded
Laravel News
Verify Nested Relations Efficiently with Laravel's Enhanced relationLoaded Method - Laravel News
Laravel's relationLoaded() method now supports dot notation for nested relationships, matching the syntax used for eager loading. This enhancement eliminates inconsistency between loading and verifying relationships, enabling more efficient conditional loading…
Enhance Collection Validation with containsOneItem() Closure Support https://laravel-news.com/containsOneItem
Laravel News
Enhance Collection Validation with containsOneItem() Closure Support - Laravel News
Laravel's containsOneItem() method now supports closures for custom condition validation, enabling verification that exactly one collection item meets specific criteria. This enhancement improves business rule validation by providing precise control over…
Test Job Failures Precisely with Laravel's assertFailedWith Method https://laravel-news.com/assertfailedwith
Laravel News
Test Job Failures Precisely with Laravel's assertFailedWith Method - Laravel News
Laravel's assertFailedWith method enables precise testing of job failures by verifying specific exception types, messages, and error codes. This enhancement makes job testing more reliable by confirming exactly how jobs fail rather than just detecting failure…
Efficiently remove expired cache data with Laravel Cache Evict https://laravel-news.com/laravel-cache-evict
Laravel News
Efficiently remove expired cache data with Laravel Cache Evict - Laravel News
Efficiently remove expired cache data with Laravel Cache Evict.
Simplify Negative Relation Queries with Laravel's whereDoesntHaveRelation Methods https://laravel-news.com/whereDoesntHaveRelation
Laravel News
Simplify Negative Relation Queries with Laravel's whereDoesntHaveRelation Methods - Laravel News
Laravel's whereDoesntHaveRelation methods simplify querying records that lack specific relationships. These utilities eliminate complex closure syntax for negative relation queries, making code more readable while supporting both standard and polymorphic…
Cast Model Properties to a Uri Instance in 12.17 https://laravel-news.com/laravel-12-17-0
Laravel News
Cast Model Properties to a Uri Instance in 12.17 - Laravel News
The Laravel team released v12.16.0, with an "AsUri" model cast, contextual service container binding using PHP 8 attributes, and more.
Enable Flexible Pattern Matching with Laravel's Case-Insensitive Str::is Method https://laravel-news.com/str-is
Laravel News
Enable Flexible Pattern Matching with Laravel's Case-Insensitive Str::is Method - Laravel News
Laravel's Str::is method now supports case-insensitive pattern matching through a third boolean parameter. This enhancement enables more flexible string comparisons with wildcard patterns, improving user experience in file validation, routing, and configuration…
Laravel OpenRouter https://laravel-news.com/laravel-openrouter
Laravel News
Laravel OpenRouter - Laravel News
The OpenRouter package for Laravel helps you integrate OpenRouter into your Laravel applications. OpenRouter is a unified interface for Large Language Models (LLMs) that allows you to interact with various AI models through a single API.
Clean Up Your Code with the whenHas Method https://laravel-news.com/clean-up-your-code-with-the-whenhas-method
Laravel News
Clean Up Your Code with the whenHas Method - Laravel News
Feeling overwhelmed by the clutter of managing optional form fields? The 'When Has' method is your solution. It streamlines your code, letting you easily check and update fields like email frequency without the mess. Plus, it provides a fallback for missing…
Replace String Prefixes Precisely with Laravel's replaceStart Method https://laravel-news.com/replaceStart
Laravel News
Replace String Prefixes Precisely with Laravel's replaceStart Method - Laravel News
Laravel's Str::replaceStart method enables precise prefix replacement by modifying strings only when they begin with specific content. This utility excels in URL normalization, path cleanup, and configuration processing where conditional string manipulation…
Fathom Analytics Events for Laravel Livewire https://laravel-news.com/fathom-analytics-events-for-laravel-livewire
Laravel News
Fathom Analytics Events for Laravel Livewire - Laravel News
The Fathom Analytics package for Laravel Livewire provides Alpine.js directives and helpers for seamless Fathom Analytics event tracking in Blade templates and Livewire components.
Simplify API Responses with Fluent Methods https://laravel-news.com/simplify-api-responses-with-fluent-methods
Laravel News
Simplify API Responses with Fluent Methods - Laravel News
Tired of constantly wrestling with type errors in API responses? Fluent methods offer a type-safe, boilerplate-free way to streamline your API handling. Forget cumbersome checks—fluent methods handle data retrieval with ease and built-in defaults. Once you…
HTML Embed Code: