Download the PHP package a909m/filament-generate-helpers without Composer

On this page you can find all versions of the php package a909m/filament-generate-helpers. 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-generate-helpers

Stand With Palestine

Filament-Generate-Helpers

StandWithPalestine Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Effortlessly create reusable form fields and table column helpers for Filament resources based on Laravel models. This package is not just about generating code—it introduces a methodology for managing forms and tables in your Filament projects, making them reusable and easier to maintain.


Why Use This Package?

When building a Filament project, it's common to encounter repetitive definitions for forms and tables in various contexts, such as:

The Problem

If a change is required in the form or table (e.g., adding a new field or column), you have to update it in multiple places. This is time-consuming, error-prone, and violates the DRY (Don't Repeat Yourself) principle.

The Solution

This package provides a systematic approach:


Features


Installation

You can install the package via composer:

Usage

Step 1: Generate Helpers

To generate helpers for a model, use the following Artisan command:

Under the hood, this command leverages Filament's built-in feature for automatically generating forms and tables. You can learn more about this feature in the Filament documentation.

This will create the following structure in your app/Filament/Helpers directory:

Step 2: Use the Helpers

In your Filament resources, relation managers, Table widgets, or any other context, you can reuse the generated helpers.

Example: Using Helpers in a Resource

How It Works

The package organizes the generated code into a helper class and two traits:

  1. Helper Class: Combines and exposes reusable methods for form fields and table columns.
  2. Traits: Separately define reusable form fields and table columns.

Generated Helper Example

For the User model:

Benefits

1. Single Source of Truth Define your form fields and table columns once. Use them across:

2. Ease of Maintenance

3. Consistency

Practical Example: Reusing a Form Across Contexts

Imagine you have a form in your UserResource, and you want to reuse it in:

  1. A relation manager (e.g., assigning roles to users).
  2. A widget (e.g., creating a quick form for new users).

Instead of copying the same schema to multiple places:

You can simply call:

Now, if you need to update the form (e.g., add a date_of_birth field), you update it in one place—the UserFormFields trait.

Conclusion

This package is not just a tool—it’s a best practice for managing reusable forms and tables in Filament projects. By centralizing your form and table logic, you save time, reduce redundancy, and ensure consistency.

Install it today and streamline your development workflow! 🎉

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-generate-helpers with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.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 a909m/filament-generate-helpers contains the following files

Loading the files please wait ....