RSS feed for this section

Archive | Laravel

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. […]

Setting the Environment Name in Laravel

One of the most important things for you to consider when planning the deployment of your application into production is how to handle detecting the “environment.” The environment name is a string identifier that is unique for each deployment environment. Typically, descriptive names such as “production,” “local,” “staging,” and “testing” are used, although you can […]