mardi 27 avril 2021

method injection in laravel

hi guys i am new in laravel i have been reading about service container but i have one question about method injection laravel has its limits regarding method injection as far as i know we can only use method injection inside 3 methods (places) first , all public methods inside constructor second , boot method inside any service provide , third , handle method inside queue jobs is there any other methods we can use method injection inside ?

namespace App\Http\Controllers ;

public function store(request $request,User $user) {

   dd($user) //it works 
}

and also works inside boot method inside service provider and inside laravel queue jobs is there any methods?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3tYy96d
via IFTTT

Aucun commentaire:

Enregistrer un commentaire