mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-01 15:09:33 +08:00
remove lc
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Registering assets
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Registering Plugin Assets"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to get started with registering assets into a plugin. Alternatively, continue reading this text-based guide."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/14"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## Overview
|
||||
|
||||
All packages in the Filament ecosystem share an asset management system. This allows both official plugins and third-party plugins to register CSS and JavaScript files that can then be consumed by Blade views.
|
||||
@@ -215,13 +206,6 @@ If your JavaScript file was [registered to a plugin](#registering-assets-for-a-p
|
||||
|
||||
#### Asynchronous Alpine.js components
|
||||
|
||||
<LaracastsBanner
|
||||
title="Using Async Alpine components"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to get started with Async Alpine components into a plugin."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/15"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
Sometimes, you may want to load external JavaScript libraries for your Alpine.js-based components. The best way to do this is by storing the compiled JavaScript and Alpine component in a separate file, and letting us load it whenever the component is rendered.
|
||||
|
||||
Firstly, you should install [esbuild](https://esbuild.github.io) via NPM, which we will use to create a single JavaScript file containing your external library and Alpine component:
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Getting started
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Setting up a Plugin"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to get started with your plugin. The text-based guide on this page can also give a good overview."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/12"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## Overview
|
||||
|
||||
While Filament comes with virtually any tool you'll need to build great apps, sometimes you'll need to add your own functionality either for just your app or as redistributable packages that other developers can include in their own apps. This is why Filament offers a plugin system that allows you to extend its functionality.
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Build a panel plugin
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Panel Builder Plugins"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to get started with your plugin. The text-based guide on this page can also give a good overview."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/16"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## Preface
|
||||
|
||||
Please read the docs on [panel plugin development](../panels/plugins) and the [getting started guide](getting-started) before continuing.
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
---
|
||||
title: Getting started
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
Panels are the top-level container in Filament, allowing you to build feature-rich admin panels that include pages, resources, forms, tables, notifications, actions, infolists, and widgets. All Panels include a default dashboard that can include widgets with statistics, charts, tables, and more.
|
||||
|
||||
<LaracastsBanner
|
||||
title="Introduction to Filament"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you how to get started with the panel builder. Alternatively, continue reading this text-based guide."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/2"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before using Filament, you should be familiar with Laravel. Filament builds upon many core Laravel concepts, especially [database migrations](https://laravel.com/docs/migrations) and [Eloquent ORM](https://laravel.com/docs/eloquent). If you're new to Laravel or need a refresher, we highly recommend completing the [Laravel Bootcamp](https://bootcamp.laravel.com), which covers the fundamentals of building Laravel apps.
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
---
|
||||
title: Overview
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Introduction to Filament"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you how to get started with the resources."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/2"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Resources are static classes that are used to build CRUD interfaces for your Eloquent models. They describe how administrators should be able to interact with data from your app - using tables and forms.
|
||||
|
||||
## Creating a resource
|
||||
@@ -114,13 +105,6 @@ This is required for features like [global search](global-search) to work.
|
||||
|
||||
## Resource forms
|
||||
|
||||
<LaracastsBanner
|
||||
title="Basic Form Inputs"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding a form to your resource."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/3"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Resource classes contain a `form()` method that is used to build the forms on the [Create](creating-records) and [Edit](editing-records) pages:
|
||||
|
||||
```php
|
||||
@@ -170,13 +154,6 @@ Forms\Components\TextInput::make('password')
|
||||
|
||||
## Resource tables
|
||||
|
||||
<LaracastsBanner
|
||||
title="Table Columns"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding a table to your resource."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/9"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Resource classes contain a `table()` method that is used to build the table on the [List page](listing-records):
|
||||
|
||||
```php
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
---
|
||||
title: Viewing records
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Creating a resource with a View page
|
||||
|
||||
To create a new resource with a View page, you can use the `--view` flag:
|
||||
@@ -13,13 +11,6 @@ php artisan make:filament-resource User --view
|
||||
|
||||
## Using an infolist instead of a disabled form
|
||||
|
||||
<LaracastsBanner
|
||||
title="Infolists"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding infolists to Filament resources."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/12"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
By default, the View page will display a disabled form with the record's data. If you preferred to display the record's data in an "infolist", you can define an `infolist()` method on the resource class:
|
||||
|
||||
```php
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
---
|
||||
title: Managing relationships
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Choosing the right tool for the job
|
||||
|
||||
Filament provides many ways to manage relationships in the app. Which feature you should use depends on the type of relationship you are managing, and which UI you are looking for.
|
||||
@@ -56,13 +54,6 @@ This feature is explained more in depth in the [Forms documentation](../../forms
|
||||
|
||||
## Creating a relation manager
|
||||
|
||||
<LaracastsBanner
|
||||
title="Relation Managers"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding relation managers to Filament resources."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/13"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
To create a relation manager, you can use the `make:filament-relation-manager` command:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
---
|
||||
title: Widgets
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Widgets"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding widgets to Filament resources."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/15"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Filament allows you to display widgets inside pages, below the header and above the footer.
|
||||
|
||||
You can use an existing [dashboard widget](../dashboard), or create one specifically for the resource.
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Plugin development
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Panel Builder Plugins"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to get started with your plugin. The text-based guide on this page can also give a good overview."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/16"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## Overview
|
||||
|
||||
The basis of Filament plugins are Laravel packages. They are installed into your Filament project via Composer, and follow all the standard techniques, like using service providers to register routes, views, and translations. If you're new to Laravel package development, here are some resources that can help you grasp the core concepts:
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: Select
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Select Input"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding select fields to Filament forms."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/4"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
The select component allows you to select from a list of predefined options:
|
||||
|
||||
```php
|
||||
|
||||
@@ -2,18 +2,9 @@
|
||||
title: Checkbox list
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Checkbox List"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding checkbox list fields to Filament forms."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/5"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
|
||||
The checkbox list component allows you to select multiple values from a list of predefined options:
|
||||
|
||||
```php
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: File upload
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="File Uploads"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding file upload fields to Filament forms."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/8"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
The file upload field is based on [Filepond](https://pqina.nl/filepond).
|
||||
|
||||
```php
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Custom fields
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Build a Custom Form Field"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/6"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## View fields
|
||||
|
||||
Aside from [building custom fields](#custom-field-classes), you may create "view" fields which allow you to create custom fields without extra PHP classes.
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Custom entries
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Build a Custom Infolist Entry"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/8"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## View entries
|
||||
|
||||
You may render a custom view for an entry using the `view()` method:
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
---
|
||||
title: Overview
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Layouts"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of customizing the layout of a Filament schema."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/6"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Filament schemas are not limited to just displaying [form fields](../../forms/fields) and [infolist entries](../../infolists/entries). You can also use "layout components" to organize them into an infinitely nestable structure.
|
||||
|
||||
Layout component classes can be found in the `Filament\Schemas\Components` namespace. They reside within the schema array of components.
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Custom layouts
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Build a Custom Schema Layout"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/7"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## View components
|
||||
|
||||
Aside from [building custom layout components](#custom-layout-classes), you may create "view" components which allow you to create custom layouts without extra PHP classes.
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: Overview
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Table Columns"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding columns to Filament resource tables."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/9"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Column classes can be found in the `Filament\Tables\Columns` namespace. You can put them inside the `$table->columns()` method:
|
||||
|
||||
```php
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
---
|
||||
title: Custom columns
|
||||
---
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
<LaracastsBanner
|
||||
title="Build a Custom Table Column"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/10"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
## View columns
|
||||
|
||||
You may render a custom view for a cell using the `view()` method:
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: Overview
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Table Filters"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding filters to Filament resource tables."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/10"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Filters allow you to define certain constraints on your data, and allow users to scope it to find the information they need. You put them in the `$table->filters()` method:
|
||||
|
||||
```php
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
title: Select filters
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: Custom filters
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Custom filter forms
|
||||
|
||||
<LaracastsBanner
|
||||
title="Build a Custom Table Filter"
|
||||
description="Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you."
|
||||
url="https://laracasts.com/series/build-advanced-components-for-filament/episodes/11"
|
||||
series="building-advanced-components"
|
||||
/>
|
||||
|
||||
You may use components from the [Form Builder](../../forms/fields) to create custom filter forms. The data from the custom filter form is available in the `$data` array of the `query()` callback:
|
||||
|
||||
```php
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
title: Actions
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import LaracastsBanner from "@components/LaracastsBanner.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
<LaracastsBanner
|
||||
title="Table Actions"
|
||||
description="Watch the Rapid Laravel Development with Filament series on Laracasts - it will teach you the basics of adding actions to Filament resource tables."
|
||||
url="https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/11"
|
||||
series="rapid-laravel-development"
|
||||
/>
|
||||
|
||||
Filament's tables can use [Actions](../actions). They are buttons that can be added to the [end of any table row](#row-actions), or even in the [header](#header-actions) of a table. For instance, you may want an action to "create" a new record in the header, and then "edit" and "delete" actions on each row. [Bulk actions](#bulk-actions) can be used to execute code when records in the table are selected. Additionally, actions can be added to any [table column](#column-actions), such that each cell in that column is a trigger for your action.
|
||||
|
||||
It's highly advised that you read the documentation about [customizing action trigger buttons](../actions/trigger-button) and [action modals](../actions/modals) to that you are aware of the full capabilities of actions.
|
||||
|
||||
Reference in New Issue
Block a user