A collection of reusable components for Filament.

Overview

laravel-filament-components

A collection of reusable components for Filament.

This package is a collection of handy components for you to use in all your Filament projects. It provides handy components that can be used in almost any project, like sidebars, timestamps & more.

PRs are welcome, so if you've made a handy component yourself, feel free to send a pull request!

Installation

You can install the package via composer:

composer require ralphjsmit/laravel-filament-components

Usage

Currently, the following components are available:

  1. Sidebar
  2. Timestamps
  3. UpdatedAt
  4. CreatedAt

Sidebar

You can use the Sidebar component to split the form into two distinct sections, like a sidebar:

use RalphJSmit\Filament\Components\Forms\Sidebar;

Sidebar::make()->schema([
    // Components for the main section here
],[
    // Components for the sidebar section here
])->getSchema()[0]

If you're using it in the Admin panel, you can directly return the Sidebar component from the form() in your resource:

use Filament\Forms\Components\Card;
use Filament\Forms\Components\TextInput;
use Filament\Resources\Form;
use RalphJSmit\Filament\Components\Forms\Timestamps;
use RalphJSmit\Filament\Components\Forms\Sidebar;

public static function form(Form $form): Form
{
    return Sidebar::make($form)->schema([
        Card::make([
            TextInput::make('title')->label('Title'),
            // ...
        ]),
        // ...
    ], [
        Card::make([
            Timestamps::make(),
            // ...
        ]),
        // ...
    ]);
}

Sidebars work very nicely with the card component to define distinct and easily scannable sections in your interface.

Timestamps

Use the Timestamps component to display a 'Created at' and 'Updated at' timestamp for your record:

use RalphJSmit\Filament\Components\Forms\Timestamps;

return $form->schema([
    ...Timestamps::make(),
    //
]);

The Timestamps component returns an array with the CreatedAt and UpdatedAt components below, so you should use array spreading like in the example to merge the components into your own array.

CreatedAt

Use the CreatedAt component to display the created_at timestamp for your record:

use RalphJSmit\Filament\Components\Forms\CreatedAt;

return $form->schema([
    CreatedAt::make(),
    //
]);

UpdatedAt

Use the UpdatedAt component to display the updated_at timestamp for your record:

use RalphJSmit\Filament\Components\Forms\UpdatedAt;

return $form->schema([
    UpdatedAt::make(),
    //
]);

General

🐞 If you spot a bug, please submit a detailed issue and I'll try to fix it as soon as possible.

🔐 If you discover a vulnerability, please review our security policy.

🙌 If you want to contribute, please submit a pull request. All PRs will be fully credited. If you're unsure whether I'd accept your idea, feel free to contact me!

🙋‍♂️ Ralph J. Smit

Comments
Releases(1.1.1)
Owner
Ralph J. Smit
Laravel Developer.
Ralph J. Smit
Decorate Your Models and Write Clean/Reusable Code with Presenters.

Laravel Presenter A clean way to present your model attributes without putting them in the wrong file. Installation You can install the package via co

Coderflex 14 Dec 19, 2022
Filament-spatie-laravel-activitylog - View your activity logs inside of Filament. ⚡️

View your activity logs inside of Filament. This package provides a Filament resource that shows you all of the activity logs created using the spatie

Ryan Chandler 45 Dec 26, 2022
A set of filament components with extra functionality & fresh look

Filament Addons A set of filament components with extra functionality & fresh look Pills (Tab Pills) Coming Soon ... Support Filament Installation You

Bezhan Salleh 15 Dec 16, 2022
A collection of easy-to-use filters with clause conditions to Filament

Filament Advanced Filter A collection of easy-to-use filters with clause conditions to Filament Installation Install the package via composer (require

Webbing Brasil 45 Jan 2, 2023
Base library for repeated layout fields, content builders and other collection components

laravel-flexible-content This package's only purpose is to build custom repeated layout components, such as Laravel Nova's Flexible Content field or y

Whitecube 5 May 31, 2022
A collection of pre-made simple Laravel Blade form components.

Laravel Form Components Library A collection of pre-made simple Laravel Blade form components. Installation & setup You can install the package via co

null 3 Oct 5, 2022
PHP components - collection of cross-project PHP classes

PHP components Collection of cross-project PHP classes. Install: $ composer require ansas/php-component Ansas\Component\Convert\ConvertPrice Convert "

null 1 Jan 5, 2022
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell

PHPAlgorithms A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDow

Doğan Can Uçar 921 Dec 18, 2022
A simple profile management page for Filament. ✨

A simple profile page for Filament. This package provides a very simple Profile page that allows the current user to manage their name, email address

Ryan Chandler 65 Jan 5, 2023
Add a general-purpose tools page to your Filament project. 🛠

Add a general-purpose tools page to your Filament project. Installation You can install the package via Composer: composer require ryangjchandler/fila

Ryan Chandler 24 Dec 6, 2022
The Most Popular JavaScript Calendar as a Filament Widget 💛

The Most Popular JavaScript Calendar as a Filament Widget ?? Features Accepts all configurations from FullCalendar Event click and drop events Upcomin

Guilherme Saade 62 Dec 31, 2022
A single-field repeater for Filament. ⚡️

A single-field repeater for Filament. This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. Insta

Ryan Chandler 3 Mar 5, 2022
A convenient helper for using the laravel-seo package with Filament Admin and Forms

Combine the power of Laravel SEO and Filament PHP. This package is a convenient helper for using the laravel-seo package with Filament Admin and Forms

Ralph J. Smit 39 Dec 21, 2022
Easily interact and control your feature flags from Filament

Easily interact and control your feature flags from Filament

Ryan Chandler 32 Nov 29, 2022
Admin user, role and permission management for Laravel Filament

Filament Access Control Opinionated setup for managing admin users, roles and permissions within Laravel Filament Features Separate database table for

Elisha Witte 69 Jan 4, 2023
Build structured navigation menus in Filament.

Build structured navigation menus in Filament. This plugin for Filament provides a Navigation resource that allows to build structural navigation menu

Ryan Chandler 61 Dec 30, 2022
Access laravel log through Filament admin panel

Access laravel log through Filament admin panel Features Syntax highlighting Quickly jump between start and end of the file Refresh log contents Clear

Guilherme Saade 20 Nov 22, 2022
Social login for Filament through Laravel Socialite

Social login for Filament through Laravel Socialite Add OAuth login through Laravel Socialite to Filament. Installation You can install the package vi

Dutch Coding Company 44 Dec 26, 2022
Provides the missing range field for the Filament forms.

The missing range field for the Filament forms. Installation You can install the package via composer: composer require yepsua/filament-range-field Pu

null 11 Sep 10, 2022