SShortSingh.
Back to feed

How Laravel Facades Route Cache::get() Calls Through the Service Container

0
·9 views

Laravel's Cache::get() does not exist on the imported facade class; instead, the Facade base class uses PHP's __callStatic() to forward the call. The facade resolves a service container binding, here a CacheManager, and caches that lookup after the first request. The manager's own magic method then forwards the call to the default store named in configuration. Facades only work once the kernel's RegisterFacades bootstrapper has set the application, which is why calling them from a bare test throws an error. Real-time facades generate facade classes on demand through an autoloader, letting code call non-facade classes statically.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Cheaper Alternatives to interviewing.io for Tech Interview Practice, Ranked by Budget

A DEV Community guide reviews alternatives to interviewing.io, whose live mock interviews start at $179 per session. It lists free peer-practice options such as Aced, a low-cost AI interviewer, and paid coaching through DesignGurus and IGotAnOffer. The author discloses building one of the listed tools, DevInterview.AI, and notes its limitations compared with human interviewers. The article recommends cheap, high-volume practice first, with one expert session shortly before a real onsite interview. All prices were stated as checked by the author on October 19, 2026.

0
ProgrammingHacker News ·

Europe's EV sales jump 70.3% in September, reaching 32.6% market share

Electric vehicle sales in Europe rose 70.3% in September compared with the same month a year earlier. Battery-electric vehicles accounted for 32.6% of total new car sales across the region. The figures point to accelerating adoption of electric cars among European buyers. The report is based on Reuters coverage of the latest regional sales data. The source article provides the full breakdown of the market trends behind the growth.

0
ProgrammingHacker News ·

Inception Unveils Mercury 3, a Diffusion-Based LLM Claiming 1,000 Tokens per Second

Inception has introduced Mercury 3, a large language model built on diffusion techniques rather than the conventional autoregressive approach. The company reports that the model can generate output at roughly 1,000 tokens per second. The announcement was shared on Hacker News, where it drew 63 points and 18 comments from readers. The source material provides only limited detail beyond the headline claim, so specifics on benchmarks and methodology are not confirmed here.

0
ProgrammingHacker News ·

Evidence (YC S21) Is Hiring Software Engineers

Evidence, a Y Combinator S21 company, has posted an opening for software engineers on its jobs page. The listing was shared on Hacker News, where it has so far drawn no points or comments. The source material contains few details beyond the hiring announcement itself, so specifics about roles, requirements, or compensation are not available. Interested applicants can find the posting at the company's jobs page linked from the item.