Skip to content

1.0.0-beta.2 - Add middleware generator and native file attributes with persisted state enums

Pre-release
Pre-release

Choose a tag to compare

@allanmcarvalho allanmcarvalho released this 13 Nov 16:39
· 16 commits to 1.x since this release

Added

  • New Artisan generator command: php artisan filoquent:make-middleware {name} {--force}

    • Implemented in src/Console/Commands/MakeMiddlewareCommand.php.
    • Generates a Filoquent upload middleware class using the new stub template resources/stubs/middleware.stub.
    • Generated namespace default: <rootNamespace>\Files.
    • The generated middleware includes a handle(Upload $file) method that delegates to $file->asset() and returns:
      • a PendingAsset, or
      • a non-empty list of results depending on what the upload resolves to.
    • Overwrite behavior: pass --force to control overwriting existing generated files.
  • Native File attributes and persisted state enums:

    • Introduces native support for File attributes and adds persisted state enums (as provided by commit 3604688).

Changed

  • Standardized middleware creation for the upload pipeline to align developer workflow with typical Laravel generator conventions.

Notes / Migration

  • To use the new middleware generator, run the new Artisan command to create the middleware class. Use --force if you intend to overwrite an existing middleware file.