laravel

  • Laravel 4 works out its environment from the hostname

    Laravel 4 decides which of the app/config/{env}/ directories to merge by matching the machine’s hostname against a list you write in bootstrap/start.php. It works until someone joins with…

  • Artisan migrate:rollback only undoes the last batch

    The migrations table records a batch number rather than a position, and migrate:rollback unwinds the highest batch — which is every migration that ran in the last migrate…

  • Rebuilding an internal admin panel on Laravel 4

    A framework four months old, an admin panel five years old, and one small section of it rebuilt to find out what Laravel 4 is like to live…

  • Eloquent with() is the fix for the N+1 you just wrote

    A relation read inside a loop issues a query per iteration. Fifty orders rendered with the customer name attached is fifty-one queries, and nothing on the page says…