mercredi 19 décembre 2018

laravel controller instance creation

I'm sorry for newbee question. (and sorry for my english)

I studied sample code on this repo https://github.com/Laracommerce/laracom/blob/master/app/Http/Controllers/Front/CartController.php

and realized that I did not understand how controllers work.

If to be more precise, I'm confused where the variables come from in Contrllers constructor

image of code And why variables (attributes in __construct function) are Interface (e.g. CartRepositoryInterface)

Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire