Archive by Author

Mastering Form Validation in Laravel 5

Laravel developers have always had a nice validation class out of the box, but unfortunately we have never had a standard way of using it. Some people prefer doing validation in controllers, others do it in models and I, as many others, preferred to do it in a separate validation layer. Of course, all of these methods worked […]

PHP Dependency Injection with Laravel 5

Dependency Injection in PHP with Laravel 5

Laravel has a great dependency injection mechanism and in the newest version this mechanism was improved even more. In this article we will review the way dependency injection works, what’s new in the 5th version and why it is amazing. Constructor injection First of all, let’s see an example of a “classical” constructor dependecy injection. […]