Tag: laravel

  • Laravel: The Ugly Command/Event – Handler System

    One distinctive feature Laravel has as part of its optional architecture is the command/event system. Commands are supposed to represent single, discrete pieces of logic that ought to handle a particular job. Events are ways to notify the system that something occurred. Both commands and event employ handlers and commands can implement the SelfHandling interface…

  • Laravel 5: .env APP_ENV not Being Read Properly and Quick Fix

    So I encountered an issue with Laravel 5 where your APP_ENV in the .env file might not be read. Even if you change it through the Homstead.yaml file, change /etc/php5/fpm/php-fpm.conf, change your .profile file, etc. you still may not see the variable properly reflected when doing something like var_dump($_SERVER) or examining the Application::Environment() function. This…

  • Laravel: Adding A Default Message to a Select Drop Down with Eloquent

    I ran into an issue earlier where I needed to add a default message to a drop down box created through Laravel’s Form builder. The difficulty was that the form select doesn’t allow for a default option. You have to manually add that. If you pre-populate your select with an Eloquent model, you will have…