There has been a lot of discussions about both the advantages and disadvantages of repository design pattern! Lets not get in to debate but lets dive in to the implementation.
Before reading further, in case you have no idea or never heard of repository design pattern, just read through this Microsoft article: https://msdn.microsoft.com/en-us/library/ff649690.aspx
First create a new laravel project
laravel new project-name
Open the project in your favorite editor and create two new folders inside app directory and name them as, Repositories and Interfaces. Inside Interfaces directory will create a new UserInterface.php class
Next inside your Repositories folder create a new class called UserRepository.php, where we will be injecting User model.
Now finally create a controller called UserController in the default controllers directory, and Inject UserRepository
That’s all! You have implemented your first laravel repository pattern.