Posts Tagged "laravel"


Ramblings of yet another developer!
  • "Unable to read key" Laravel Error Deploying to Dokku/Heroku

    Posted on Jan 10, 2024

    I've recently had all sorts of issues building a Laravel app for Dokku because the Heroku buildpack it uses builds the application in an isolated container that has no access to the storage/ directory. I consistently found myself getting errors such as the following when running artisan commands: Unable to read key from file file:///tmp/build/storage/oauth-public.key

  • "Trying to get property 'x' of non-object" With Null Coalescing Operator in PHP

    Posted on Aug 06, 2020

    Quick one here but today, thanks to Tez on Stack Overflow, I discovered that PHP's null coalescing operator (the double question mark operator) can fail when you use a function at any part of the statement.

  • Laravel Bug: Eloquent firstOrCreate() Broken With $casts Model Attribute

    Posted on Nov 09, 2017

    There's a bug with Eloquent's firstOrCreate() function where it doesn't work with the $casts attribute on the model; it will always either insert a new instance into the database or give a MySQL duplicate entry error.

  • Laravel to October CMS: The Differences (Part 3)

    Posted on Jun 12, 2015

    So last time we discovered that the C of our beloved MVC has gone. But given that we no longer have a routes.php file and all of the models are kept in plugins, it wasn't going to be able to work in the traditional Laravel way anyway. Click to read more.

  • Booting Eloquent Model Traits

    Posted on Jun 02, 2015

    So I've learnt a little Laravel/Eloquent trick today that is very much under-documented. Save for a casual mention in the Laravel documentation. Click to read more!