I just rad about Laravels service injection, and I try to implement one but is not clear how would I go on with this.
The problem: I have some dynamic elements which should be rendered on some calculation and I want to be abble to this inside blade on the flow but without using @php to create variables inside view
I created a Class inside
App\Services\CalculatorService
than i injected inside blade
@inject('service', 'App\Services\CalculatorService')
but I get
Class App\Services\CalculatorService does not exist
How Laravel knows abot this classes, what do I have to do?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire