Laravel interfaces and di
Skill ComeOnOliver/skillshub/skills/noartem/skills/laravel-interfaces-and-di
🧠The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description
npx -y skills add ComeOnOliver/skillshub --skill laravel-interfaces-and-diAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.5 KB, 102 tokens by cl100k_base, as published. Nobody here has run it
Interfaces and Dependency Injection
Define narrow interfaces and inject them where needed. Bind concrete implementations in a service provider.
interface Slugger { public function slug(string $s): string; }
final class AsciiSlugger implements Slugger {
public function slug(string $s): string { /* ... */ }
}
$this->app->bind(Slugger::class, AsciiSlugger::class);
Benefits: easier testing (mock interfaces), clearer contracts, swap implementations without touching consumers.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.