im using laravel 5.4 , im trying figure out new application how set well. digged repositories didnt gave real answer. found https://bosnadev.com/2015/03/07/using-repository-pattern-in-laravel-5/ , sounds pretty clear me.
a old co worker told me way of using repositories im taking answer not well... showed me this:
class examplerepository { public function __construct() { $this->models(); } private function models() { $this->user = app( user::class ); } public function finduser( $userid ) { return $this->user->find( $userid ); } }
my real question: example should use according standards , flexibility?
Comments
Post a Comment