Download the PHP package felipereisdev/filament-crud-maker without Composer

On this page you can find all versions of the php package felipereisdev/filament-crud-maker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-crud-maker

Filament CRUD Maker

PHP 8.3+ Laravel 11/12/13 Filament v4/v5 PHPStan Level 9

A Laravel package that generates complete CRUD resources for Filament admin panels with a single Artisan command. Define your fields, relationships, and validations — the generator creates your Model, Migration, and fully configured Filament Resource with smart form components, table columns, filters, and actions.

Key highlights:


Requirements

Dependency Version
PHP ^8.3
Laravel ^11.28 | ^12.0 | ^13.0
Filament ^4.0 | ^5.0

Installation

Install the package via Composer:

The service provider is auto-discovered. Optionally, publish the configuration file:

This publishes config/filament-crud-maker.php where you can customize namespaces, auto-migration, and auto-formatting behavior.

You can also publish the Laravel Pint configuration:

Quick Start

Generate a complete Product CRUD with fields, validations, and a category relationship in one command:

This creates:


Usage

Interactive Mode

If you omit --fields, the command will detect that you are in an interactive terminal and offer a step-by-step wizard:

The wizard collects the same information as the CLI flags and assembles it into the standard format. Non-interactive invocations (piped, CI, --no-interaction) are unaffected.

Command Syntax

Argument / Option Description
model Name of the model (singular, PascalCase). Example: Product, BlogPost
--fields= Comma-separated list of fields. See Field Format
--relations= Semicolon-separated list of relationships. See Relationships
--softDeletes Add SoftDeletes trait and softDeletes() migration column
--no-migrate Skip running migrations after generation
--no-format Skip Laravel Pint auto-formatting
--clean-resources Clean and regenerate all existing Filament resources

Field Format

Fields follow the format:

Segment Required Description
name Yes The database column / field name (snake_case)
type Yes The field type (see Supported Field Types)
default No Default value. Use true/false for booleans, numbers for numeric types, or a plain string for text/select types (e.g. active, expense). Applied to both the form component and the migration column.
validation No One or more validation rules. Rules with values use = syntax (e.g. min=3)

Examples:


Supported Field Types

Text & String

Type Form Component Table Column Migration Type
string TextInput TextColumn (searchable, sortable) string
text TextInput TextColumn (searchable, sortable) text
textarea Textarea TextColumn (limit 50, tooltip) text
longtext Textarea TextColumn (limit 50, tooltip) longText

Numeric

Type Form Component Table Column Migration Type
integer TextInput (numeric, step 1) TextColumn (numeric) integer
bigInteger TextInput (numeric, step 1) TextColumn (numeric) bigInteger
decimal TextInput (numeric, decimal) TextColumn (numeric/money*) decimal(10, 2)
float TextInput (numeric, decimal) TextColumn (numeric) float(8, 2)
double TextInput (numeric, decimal) TextColumn (numeric) double

* Fields named price, preco, or valor automatically use ->money('BRL') formatting.

Boolean

Type Form Component Table Column Migration Type
boolean Toggle ToggleColumn boolean
checkbox Checkbox ToggleColumn boolean

Date & Time

Type Form Component Table Column Migration Type
date DatePicker TextColumn (date format) date
datetime DateTimePicker TextColumn (dateTime format) datetime
time TimePicker TextColumn (time format) time

Selection

Type Form Component Table Column Migration Type
select Select (with ->options([ /* TODO */ ])) TextColumn (badge, searchable, sortable) string
enum Select (with ->options([ /* TODO */ ])) TextColumn (badge) string
foreignId Select (with ->relationship()) TextColumn (relationship) foreignId
checkboxes CheckboxList (with ->options([ /* TODO */ ])) TextColumn json
radio Radio (with ->options([ /* TODO */ ])) TextColumn (badge, searchable, sortable) string
toggleButtons ToggleButtons (with ->options([ /* TODO */ ])) TextColumn (badge) string

File & Media

Type Form Component Table Column Migration Type
file FileUpload (disk: public, dir: uploads) TextColumn string
image FileUpload (image, 16:9 crop, disk: public, dir: images) ImageColumn (circular) string

Rich Content

Type Form Component Table Column Migration Type
richtext / editor RichEditor TextColumn (limit 50, tooltip) longText
markdown MarkdownEditor TextColumn (limit 50, tooltip) text

Special

Type Form Component Table Column Migration Type
color ColorPicker ColorColumn string
tags TagsInput TextColumn (badge) json
code / json CodeEditor TextColumn (limit 50, tooltip) longText / json
slider / range Slider TextColumn (numeric) integer
keyvalue KeyValue TextColumn (limit 50, tooltip) json

Validation Rules

Apply validation rules to fields using the rule or rule=value syntax after the field type.

Rule Syntax Form Component Method Description
Required required ->required() Field must be filled
Minimum min=N ->minLength(N) or ->minValue(N) Min length (text) or min value (numeric)
Maximum max=N ->maxLength(N) or ->maxValue(N) Max length (text) or max value (numeric). For string fields, also sets the column length in the migration: $table->string('name', N)
Between between=X,Y ->minValue(X)->maxValue(Y) Value must be between X and Y. The comma inside the value is handled correctly and won't split the field
Email email ->email() Must be a valid email address
URL url ->url() Must be a valid URL
Phone tel ->tel() Phone number input
Password password ->password() Masked password input
Confirmed confirmed ->confirmed() Requires a confirmation field
Nullable nullable ->nullable() Field can be null (also applied to migration)
Unique unique ->unique() Value must be unique (also applied to migration)
Exists exists=table,column ->exists('table', 'column') Value must exist in another table

Example combining multiple rules:


Relationships

Define relationships using the --relations option. Multiple relationships are separated by semicolons (;).

Format

You can optionally specify fields for the related model. If the related model doesn't exist, it will be created automatically along with its migration and Filament resource.

Supported Relationship Types

Type Description Automatic Actions
belongsTo Many-to-one (e.g. Product belongs to Category) Adds foreignId column + constrained()->onDelete('cascade') to migration
belongsToMany Many-to-many (e.g. Course has many Students) Creates pivot table with foreign keys and unique constraint. Generates Select::make()->multiple()->relationship() in the form. Also generates the inverse relationship on the related model
hasOne One-to-one (e.g. User has one Profile) Adds relationship method to model. Automatically adds foreignId + constrained() FK column to the related model's migration (uses a separate alter migration when the target table already exists or has custom fields to avoid FK ordering issues). Alter migrations generate the FK column as nullable for safety with existing data. Also updates the related model's $fillable array and adds the inverse belongsTo relationship method
hasMany One-to-many (e.g. Course has many Lessons) Adds relationship method to model. Automatically adds foreignId + constrained() FK column to the related model's migration (uses a separate alter migration when the target table already exists or has custom fields to avoid FK ordering issues). Alter migrations generate the FK column as nullable for safety with existing data. Also updates the related model's $fillable array and adds the inverse belongsTo relationship method
morphTo Polymorphic inverse (e.g. Comment belongs to Post or Video) Adds $table->morphs('{morphName}') to migration; the second segment is the morph name
morphOne Polymorphic one-to-one (e.g. Post has one Image) Adds relationship method. Morph name can be explicit (morphOne:Attachment:attachable) or auto-derived ({snake(relatedModel)}able)
morphMany Polymorphic one-to-many (e.g. Post has many Comments) Adds relationship method. Morph name can be explicit (morphMany:Attachment:attachable) or auto-derived ({snake(relatedModel)}able)

Polymorphic examples:

For morphTo, the second segment is the morph name (e.g. commentable), not a model class. The generator adds $table->morphs('commentable') to the migration and $this->morphTo() to the model.

For morphOne and morphMany, the second segment is the related model class. You can optionally provide the morph name as a third segment to match the morphTo side exactly:

When using morphTo:attachable on the child model, make sure the parent's morphMany or morphOne uses the same morph name (attachable), either explicitly or by auto-derivation.

Examples

Single relationship:

Multiple relationships:

Relationship with fields for the related model:

Pivot tables for belongsToMany relationships are automatically created with the correct naming convention (alphabetical order), foreign keys, and a unique constraint on the pair.


Practical Examples

1. Blog Post with basic fields

2. E-commerce Product with relationships

3. Course platform with complex relations

4. Settings page with special fields


Configuration

After publishing, the config file is located at config/filament-crud-maker.php:

Both model_namespace and resource_namespace are fully respected by the generator — all file path resolution and use import statements are derived from these values. If you use a non-standard namespace (e.g. a DDD structure), update these keys and the generator will place and import files correctly.

What Gets Generated

For each model, the generator creates or updates:

File Location Description
Model app/Models/{Model}.php Eloquent model with $fillable, $casts, relationship methods, and optionally SoftDeletes
Migration database/migrations/xxxx_create_{table}_table.php Migration with all column types, foreign keys, defaults, nullable/unique constraints
Resource app/Filament/Resources/{Model}Resource.php Filament resource entry point
Schema .../{Model}Resource/Schemas/{Model}Form.php Form schema with all field components (Filament v4 structure)
Table .../{Model}Resource/Tables/{PluralModel}Table.php Table with columns, filters, edit actions, and bulk delete (Filament v4 structure)

Automatic features:


Flags & Options

--softDeletes

Adds the SoftDeletes trait to the model and a softDeletes() column to the migration. The generated table automatically includes a TrashedFilter so administrators can view, restore, and permanently delete soft-deleted records from the Filament UI.

--no-migrate

Skips running php artisan migrate after file generation. Useful when you want to review or adjust the migration before running it. You can also disable auto-migration globally in the config file.

--no-format

Skips Laravel Pint auto-formatting. Useful in CI environments or when you prefer to format manually. You can also disable auto-formatting globally in the config file.

--clean-resources

Cleans and regenerates all existing Filament resources in your application. This re-processes imports and formatting across all resource files.


Development

Setup

Commands

Running a single test


License

This package is open-source software licensed under the MIT license.


All versions of filament-crud-maker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0|^5.0
laravel/framework Version ^11.28|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package felipereisdev/filament-crud-maker contains the following files

Loading the files please wait ...