Download the PHP package luttje/filament-user-attributes without Composer

On this page you can find all versions of the php package luttje/filament-user-attributes. 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-user-attributes

![Filament User Attributes](./.github/banner.jpeg)

[!Warning] This package is still in development. It is not yet ready for production use and the API may change at any time.

[![Tests](https://github.com/luttje/filament-user-attributes/actions/workflows/run-tests.yml/badge.svg)](https://github.com/luttje/filament-user-attributes/actions/workflows/run-tests.yml) [![Coverage Status](https://coveralls.io/repos/github/luttje/filament-user-attributes/badge.svg?branch=main)](https://coveralls.io/github/luttje/filament-user-attributes?branch=main) [![Fix PHP Code Styling](https://github.com/luttje/filament-user-attributes/actions/workflows/fix-php-code-styling.yml/badge.svg)](https://github.com/luttje/filament-user-attributes/actions/workflows/fix-php-code-styling.yml)

Filament User Attributes

Let your users specify custom attributes for models in Filament, similar to Custom Fields in WordPress.

Demonstration: showing the creation of a custom user attribute for the 'Locations' resource of this app:

https://github.com/luttje/filament-user-attributes/assets/2738114/f0c070a7-2845-4e54-973d-e9d661fa55a0

In this demonstration:

  1. A checkbox is added and it's order in the table and form is specified.
  2. The checkbox is displayed in the table and form. Users can now toggle the checkbox and view the value in the table.

[!Note] This is a third-party package not affiliated with Filament or Laravel.

🚀 Getting started

  1. Make sure your project meets these requirements:

    • PHP 8.1 or higher
    • Livewire 3.0.3 or higher
    • Filament 3.0 or higher
    • A database that supports JSON columns, e.g:
      • MySQL 5.7.8 or higher
      • PostgreSQL 9.2 or higher
      • SQLite 3.38 or higher
  2. Install the package via composer:

  3. Run the following command to fully install the package:

    This publishes the migrations to create the two required tables and runs them.

  4. Run the wizard command to help you setup your project code:

    The wizard will help you:

    • Specify which models should have custom user attributes
    • Setup a model that can configure the user attributes for each user (e.g. a user or tenant model)
    • Setup resources that the configuration model can configure custom attributes for

    Finally you need to show the user attributes configuration form somewhere. That way users can actually configure their custom attributes for the resource.

  5. Create a resource and inherit from the UserAttributeConfigResource class:

    Or you can create your own resource from scratch. See the source code for inspiration.

🎉 That was all, you and your users can now configure custom attributes!

Your users (or tenants) can now configure custom attribute fields:

The configured custom attributes are (optionally) added to the resource form and table:

🎉 You're now ready to:
🖇 Let your users configure which attributes should be added to models
🎈 Have the custom attribute fields and columns display in a Livewire component
📎 Set and use the user attributes yourself

✏ Customizing

✨ Features

Supported Input types:

❤ Contributing

Please see how to run the tests.


All versions of filament-user-attributes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
filament/forms Version ^3.0
filament/tables Version ^3.0
illuminate/contracts Version ^v10.17
livewire/livewire Version ^3.0.3
spatie/laravel-package-tools Version ^1.15.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 luttje/filament-user-attributes contains the following files

Loading the files please wait ....