PHP
Alpine 3.x Tips and Tricks
Here are a few tips and tricks that you can use in your Alpine 3.x components. Read More
Here are a few tips and tricks that you can use in your Alpine 3.x components. Read More
Regular expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task. Here are some tips to improve and write Read more…
[AdSense-A]
I'm thrilled to announce that our premium course Event Sourcing in Laravel has just launched.
If you ever wanted to get started with event sourcing, this is the course for you. It contains a beautifully designed ebook, two hours worth of videos, and a demo Laravel app containing an event-sourced shopping cart.
Event sourcing isn't an all or nothing approach. Even if your project doesn't need the full power of event sourcing, you can still benefit from knowing and implementing best practices from the event sourcing world.
We're offering a 20% launch discount for the next two weeks to celebrate this release.
In this stream, you can see my colleague Brent and I launch the course, and answer questions from the audience.
(more…)Jess Archer show a nice approach on how to use exception in the HTTP layer. Read More
Mohamed shows how you can deal with N+1 problems using the $with model attribute and the newly added Model::preventLazyLoading() method.
Benjamin Eberlei tells the story of a performance mistake that is quickly made even by experienced developers. Read More
Mohammed Said created another kick ass video, this time on how Laravel handles DB connections.
Tobias explains how you can make this operation very fast even if your table has several million records. Read More
[AdSense-A]
A couple of years ago, Ignition became the default error page in Laravel.
Ignition provided a vastly improved design over Whoops: it brought Laravel specific niceties (such as showing the routing, queries) and the ability to display and even run solutions (e.g. generating an app key).
At Spatie, we think we can improve the design of Ignition even more. Our initial plan was to release this new design in tandem with Laravel 9 as a big bang surprise release. We've changed our mind on this because we'd like to have feedback from the community.
In this blog post, I'd like to share our ideas and plans for Ignition.
The most visible change is that we're tinkering with a new design. Here's the latest version of our mockup:
The current release version of Ignition has a lot more empty space. The information density has increased in our new design; there's more information on a smaller space.
When viewing Ignition on a larger screen, you can see that we make better use of the space. Click on the image to see it in full size.
For reference, here's how the current Ignition version looks like:
And of course, there's also a beautiful dark mode for people that claim that white-based things hurt their eyes.
One thing that we didn't like about the current Ignition version is that you have to click to see the other tabs like "Request", "App", "User", and so on. You can still click those names in the heading in the new design, but you can also scroll down. No clicks needed anymore to see all the info.
In the header of the new design, you'll also see a button that brings you to the Laravel docs. A neat thing is that you will get brought to the correct version of the docs (so, in Laravel 8 app, that link will point to v8 of the docs).
Of course, when the new Ignition design is launched, we'll also update how exceptions are shown in Flare to match Ignition.
We'll also bring changes in how an exception can be shared via Flare. On the current Ignition page, you'll get a menu where you'll get an admin link and a public link after an error is shared. The idea is that you can send the public link to persons that you'd like to share your exception with. The admin link can be used to delete the shared error if needed.
In the new version of Ignition, this will work differently. We think that it's better for everyone if we don't store exceptions indefinitely. That's why we are going to keep a shared error only around for one day. This way, you can safely share data knowing that we'll scrub it from Flare quite fast.
Before starting implementing the design, we cleaned up the current codebase. Facade/ignition is quite a heavy package, and we wanted to simplify it. That's why we split it up in two new packages: spatie/ignition (which is framework agnostic) and spatie/laravel-ignition (which contains the Laravel specific bits).
These two packages feel much lighter, making them easier for us to maintain. We decided to put the new versions of Ignition on our own Spatie GitHub organisation as the legal entity behind Facade is winding down.
There isn't a stable version tagged of spatie/ignition or spatie/laravel-ignition just yet, but it all should work. If you're feeling adventurous and want to provide us with feedback, please try them out.
We can only dream, but it would be pretty cool to see Ignition being used by developers of Symfony, WordPress and other frameworks.
facade/ignition will remain the default error page in Laravel 8. We'll also continue maintaining it for Laravel 8 and below.
spatie/laravel-ignition will be compatible with Laravel 8, so those who want to switch after a stable release is available. If all goes according to plan, Laravel 9 will use spatie/laravel-ignition as the default.
I hope that you like the changes we have in store for Ignition.
As mentioned above, we didn't implement the new design shown above just yet. It's now in the idea phase. In the next couple of weeks, you'll see us add it to spatie/laravel-ignition.
We welcome your feedback on the new design and our plans. Let us know via Twitter or comment below this post.
If you like the design, also thank my colleague Willem, he's the one that makes everything cooked at Spatie look pretty.
(more…)