- March 8, 2024
- Posted by: AliensFaith
- Category: OBJECTIVE PRESS
No Comments
TLDR: Here’s the package: Affinity4/SlimFacades
Why did I do this?
So, I use Laravel professionally, but when I’m just trying out a new package, or messing around with a concept I generally reach for Slim first.
Anyways, I was trying to learn more about how Laravel wires up its Facades so easily, and I decided to try do the same in Slim. A few days later and I added Macroable
, Conditionable
, ForwardsCalls
, Tappable
, tap()
, response()
, dd()
, Pipeline
, and Hub
(you find this in the Laravel docs) and Dumpable
(which will be in Laravel 11)
I learned a bunch about Laravel.
- The
tap
helper is awesome, and I have not used it enough! - Pipelines are a great way to clean up your controllers and make them easier to unit test
- The Proxy Pattern is a great thing to have in your back pocket…check out the
ForwardsCalls
in the README. If you’ve ever wished you could inherit a final class in PHP, this pattern could be for you!
Hope you try it…hope you like it!
submitted by /u/LukeWatts85
[link] [comments]