Laravel Pint --bail Flag
Laravel News
by Laravel News
21h ago
With this week's v1.15.0 release of Laravel Pint, a new --bail flag was introduced. The bail flag stops Laravel pint execution on the first failure like Pest: This flag is useful in CI environments or pre-commit hooks to test for code-style errors without fixing them. Hat tip to Nuno Maduro, who submitted the --bail feature in Pull Request #261. It's exciting to see these continuous improvements around the Laravel ecosystem! To get started with Laravel Pint, check out the official documentation. The post Laravel Pint --bail Flag appeared first on Laravel News. Join the Laravel Newsletter to ..read more
Visit website
The Laravel Worldwide Meetup is Today
Laravel News
by Laravel News
2d ago
The next Laravel Worldwide Meetup is today at 16:00 UTC featuring TJ Miller. TJ is going to take us on an AI crash course and show us how to get up and running in a Laravel application with the help of an exciting new package. Visit the official page for complete details and to submit your talk for a future meetup. The post The Laravel Worldwide Meetup is Today appeared first on Laravel News. Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox ..read more
Visit website
Cache Routes with Cloudflare in Laravel
Laravel News
by Laravel News
3d ago
The Cloudflare Cache package for Laravel provides cacheable routes, allowing you to serve millions of requests for static pages efficiently. You can define a group of cacheable routes with the Laravel router, including tags. This package makes it easy to start caching with Cloudflare using the Route::cache() method: Route::cache(tags: ['tag1', 'tag2'], ttl: 600)->group(function () { Route::get('/content_with_tags', function () { return 'content'; }); }); Route::cache(tags: ['staticPages'])->group(function () { // }); This package gives you APIs to purge all conten ..read more
Visit website
Learn how to manage timezones in your Laravel Apps
Laravel News
by Laravel News
6d ago
In this video, Ben Holmen teaches us how to manage timezones in your Laravel apps. Some of the highlights include: Store all dates and times in UTC Define a default application Timezone Use Carbon macros for conversions Either automatically or manually, allow the user to select their timezone Here are the code samples used in the video: In Application Timezone Macro Carbon::macro('inApplicationTimezone', function() { return $this->tz(config('app.timezone_display')); }); In User Timezone Macro Carbon::macro('inUserTimezone', function() { return $this->tz(auth()->user()?->timez ..read more
Visit website
"Can I PHP?" Raycast Extension
Laravel News
by Laravel News
6d ago
The Can I PHP? Raycast extension by Diana Scharf lets you check if a certain function or method is available in different versions of PHP. You can see which versions are supported and the deprecation status at a glance: If you hit Enter, you get a helpful details page from the caniphp.com project. The Can I PHP API is like caniuse.com, but for PHP. The alternative to this extension is manually looking up the PHP documentation and finding when something was introduced; for example, here's the uft8_decode documentation: To get started with this extension, you can search the store for "Can I P ..read more
Visit website
Introducing the Context Facade in Laravel
Laravel News
by Laravel News
1w ago
Laravel added a new Context service to define contextual data to the current request. Context data is included in all log entries for that request, and queued jobs will also retain that same data. Using contextual data allows you to easily trace back code execution for a given request and any distributed flows in your application: // In a middleware... Context::add('hostname', gethostname()); Context::add('trace_id', (string) Str::uuid()); // In a controller... Log::info('Retrieving commit messages for repository [{repository}].', [ 'repository' => $repo, ]); Http::get('https://git ..read more
Visit website
Easily create complex database queries with the Query Enrich Package
Laravel News
by Laravel News
1w ago
Laravel Query Enrich is designed to easily create complex database queries in Laravel without having to write complicated SQL code. Here are some examples taken from the readme: Example of fetching orders placed in the last 7 days With Laravel Query Enrich $recentOrders = DB::table('orders') ->where(c('created_at'), '>=', QE::subDate(QE::now(), 7, Unit::DAY)) ->get(); Without Laravel Query Enrich $recentOrders = DB::table('orders') ->whereRaw('created_at >= NOW() - INTERVAL ? DAY', 7) ->get(); Raw Query SELECT * FROM `orders` WHERE `created_at` >= NOW ..read more
Visit website
Launch your Startup Fast with LaraFast
Laravel News
by Laravel News
1w ago
LaraFast is a powerful Laravel boilerplate equipped with Jetstream, Tailwind, Inertia.js, and Vue. It streamlines your SaaS app development by providing ready-to-go components for Payments, Admin, Blog, SEO, and more. This allows you to launch your projects in minutes, saving you both time and money. Focus on idea, and leave the boring stuff to LaraFast This Laravel Boilerplate comes with built in features, to help you save your time and money each time you start a new project. Payments. Plan Checkout Sessions, Single Product Purchases, Customer Portal, Webhook Handling. All out of the box w ..read more
Visit website
Embed Livewire Components on Any Website
Laravel News
by Laravel News
1w ago
Laravel developer Philo Hermans is cooking up the wire-extender Livewire package that allows you to embed a component on any website or even a static HTML file. This package is still at an early stage, but I thought it would be as good a time as any to share! The gist of this package is using the Embeddable attribute in a Livewire component along with a wire-extender.js file that ships with this package: use WireElements\WireExtender\Attributes\Embeddable; #[Embeddable] class Counter extends Component {} After creating the component like a normal Livewire component and following the docume ..read more
Visit website
Statamic announces next Flat Camp retreat (EU edition)
Laravel News
by Laravel News
1w ago
Statamic's Flat Camp is an unforgettable, relationship-focused retreat for the Statamic and Laravel community. Happening June 11-14, 2024, and set in the idyllic Italian countryside, right outside Rome, surrounded by beautiful scenery, we talk both business and non-business. Spend time with the gentlemen from the Statamic Core team, meet those lovely people from the community IRL, influence the future roadmap, and talk about operating your freelance or agency business to peers, all while sitting by the pool, having lunch or dinner cooked by a private chef, and more! It's a different experienc ..read more
Visit website

Follow Laravel News on FeedSpot

Continue with Google
Continue with Apple
OR