Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel File Generator

Laravel File Generator Laravel Package

skyronic/laravel-file-generator

Laravel File Generator adds customizable Artisan commands for scaffolding files from templates. Define generators in config, pass variables, and create models, services, repositories, or any project file consistently, speeding up repetitive boilerplate while keeping generated code aligned with your...

View on GitHub
Deep Wiki
Context7

A Laravel package which helps you automate creation of files.

Frequently asked questions about Laravel File Generator
How do I install skyronic/laravel-file-generator?
Install it as a dev dependency with composer require --dev skyronic/laravel-file-generator. The package ships a service provider that Laravel auto-discovers, so no manual registration is required. After installing, publish the config file and define your generators there. Most teams get a working setup in well under an hour.
Does laravel-file-generator support the latest Laravel versions?
The package had a release in April 2024, which suggests it was being kept current around that time, but you should read the composer.json to confirm the declared Laravel and PHP version constraints. Laravel ships a new major every year, so verify support for your specific major during evaluation. If your version is not declared, pilot it on a throwaway branch before standardizing.
What is the difference between laravel-file-generator and Blueprint?
Both packages scaffold multiple files from a declarative blueprint instead of running make:* commands one at a time. jasonmccreighton/blueprint has far more community adoption and validation, while skyronic/laravel-file-generator is a smaller, simpler alternative with a single maintainer. Treat them as alternatives rather than an additive layer, since adopting both rarely makes sense.
Should laravel-file-generator go in require-dev?
Yes. It is a developer-experience tool that hooks into Artisan and writes files, and it has no bearing on production request paths. Keeping it in require-dev leaves your production dependency surface clean. There is no runtime container, middleware, or database concern to deploy.
Does laravel-file-generator support dry-run or protect against overwriting files?
File-write collisions when generation is re-run against existing files are a known concern, so check the current source for dry-run flags and overwrite protection before relying on it. Because blueprints are plain text committed to the repo, git shows you exactly what was touched. A safe habit is generating on a clean working tree so collisions are easy to spot and revert.
Can I use my own stubs and non-default namespaces with laravel-file-generator?
The package is built around customizable generators, so templates and output are configurable rather than hardcoded to vanilla conventions. Whether it cleanly honors existing custom stubs and non-default PSR-4 namespaces is worth confirming against your project layout in a pilot. If your conventions already live in customized make stubs, expect this to replace them rather than layer on top.
How do I define a custom generator in laravel-file-generator?
Generators are declared in the published config and blueprint files, along with the templates they emit and the variables they accept. You commit those blueprints alongside your code so they diff, review, and version like any other artifact. You then invoke the generator from Artisan, passing values for the declared variables.
Can I pass variables to a generator when running it from Artisan?
Yes. The package's core premise is that you define generators in config, pass variables, and have templates render with those values. That is how one blueprint can emit a model, service, repository, or test with consistent naming. The exact syntax for passing variables is covered in the README.
Is skyronic/laravel-file-generator actively maintained?
It has roughly 66 GitHub stars and effectively a single maintainer, so bus factor is the main risk rather than the technology. The April 2024 release shows recent activity, but release cadence does not guarantee future upkeep. If you invest heavily in blueprints, have an internal owner willing to fork, since the package is small enough to audit by reading its source.
Can laravel-file-generator create a model, migration, controller, and test in one command?
Yes, that is the core use case: a single blueprint emits a coherent set of files with consistent naming instead of several separate make:* commands. This pays off most on repetitive CRUD-heavy domain slices. Generated code should still pass through normal review, because generation amplifies both good and bad conventions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections