laravel

  • Forced scoping on a nested route binding

    A nested route binding resolved both models independently, so a request for one customer’s order under another customer’s URL returned the order. The unscoped behaviour is an authorisation…

  • Full-text indexes in the schema builder

    A full-text index needed raw SQL in a migration until 9.0, which meant it was invisible to anything reading the schema definition. Natural language mode is the default…

  • Laravel 9 moved to Symfony 6 and took PHP 8 with it

    February, the first annual major, and a version number that means less than it used to. The work is two packages that block everything.

  • Laravel 9 accessors are one method rather than two

    February’s release replaces the get-and-set method pair with a single method returning an Attribute object. The old syntax still works and is not deprecated, so this is an…

  • The Scout database driver, and the ceiling it has

    Laravel 9 ships a Scout driver backed by the database, which removes a search service from a project that had one for one feature. The ceiling is real…

  • Freezing time, and the code that calls time() directly

    A test freezing the framework clock still fails against code calling time() or new DateTime(), because those bypass it entirely. The database clock is the one that catches…

  • Enums, and the string column that was pretending

    8.1 on 25 November, and the feature PHP had been simulating with class constants for a decade. A status column holding three spellings of the same thing.

  • The framework extension is what makes level 8 possible

    A service container returning mixed and a model with magic properties defeat static analysis entirely without a framework-aware extension. The extension is not optional on a framework-heavy codebase…

  • Readonly properties and the value object that stops defending itself

    8.1, and a keyword that removes a getter per property. Forty value objects, each with private fields and public accessors that existed only to prevent writes.

  • Sparse fieldsets make the query count depend on the caller

    Letting a client choose which fields it wants is a good feature and moves the eager-loading decision from the controller to the request. Without deriving the eager loads…