mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 23:35:30 +08:00
adjust admin panel package naming
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
**Using actions inside the [App Framework](../app)**? You can skip this installation. This guide is for people who want to use the package inside their custom TALL-stack app.
|
||||
|
||||
## Requirements
|
||||
|
||||
Filament has a few requirements to run:
|
||||
@@ -10,8 +12,6 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
Actions come pre-installed inside the [admin panel 3.x](/docs/admin/3.x), but you must still follow the installation instructions below if you're using it in the rest of your app.
|
||||
|
||||
First, require the actions package using Composer:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -10,11 +10,11 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
This package is compatible with other Filament v3.x products. The [form builder](/docs/forms), [table builder](/docs/tables) and [notifications](/docs/notifications) come pre-installed with the package, and no other installation steps are required to use them within the admin panel.
|
||||
This package is compatible with other Filament v3.x products. The [form builder](/docs/forms), [table builder](/docs/tables) and [notifications](/docs/notifications) come pre-installed with the package, and no other installation steps are required to use them within the App Framework.
|
||||
|
||||
## Installation
|
||||
|
||||
To get started with the admin panel, you can install it using the commands:
|
||||
To get started with the App Framework, you can install it using the commands:
|
||||
|
||||
```bash
|
||||
composer require filament/filament:"^3.0"
|
||||
@@ -27,17 +27,17 @@ If you don't have one, you may create a new user account using:
|
||||
php artisan make:filament-user
|
||||
```
|
||||
|
||||
Visit your admin panel at `/admin` to sign in, and you're now ready to start [building your app](getting-started)!
|
||||
Visit your app at `/admin` to sign in, and you're now ready to start [building your app](getting-started)!
|
||||
|
||||
[](https://demo.filamentphp.com)
|
||||
|
||||
## Deploying to production
|
||||
|
||||
By default, all `App\Models\User`s can access Filament locally. To allow them to access Filament in production, you must take a few extra steps to ensure that only the correct users have access to the admin panel.
|
||||
By default, all `App\Models\User`s can access Filament locally. To allow them to access Filament in production, you must take a few extra steps to ensure that only the correct users have access to the app.
|
||||
|
||||
Please see the [Users page](users#authorizing-access-to-the-admin-panel).
|
||||
|
||||
If you don't complete these steps, there will be a 403 error when you try to access the admin panel in production.
|
||||
If you don't complete these steps, there will be a 403 error when you try to access the app in production.
|
||||
|
||||
## Publishing configuration
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
You may be wondering how to get started building an app with Filament. There are many features, spread across several packages, that compose even the simplest of admin panels. This guide will teach you a few core concepts of the framework, and give you a glimpse of what is possible.
|
||||
You may be wondering how to get started building an app with Filament. There are many features, spread across several packages, that compose even the simplest of apps. This guide will teach you a few core concepts of the framework, and give you a glimpse of what is possible.
|
||||
|
||||
Before using Filament, you need to be familiar with Laravel. Many core Laravel concepts are used within Filament, especially [database migrations](https://laravel.com/docs/migrations) [Eloquent ORM](https://laravel.com/docs/eloquent). If you've never used Laravel before, or need a refresher, we highly recommend that you follow the [Laravel Bootcamp](https://bootcamp.laravel.com/blade/installation) to build a small app. The guide will give you a great foundation of knowledge that you would otherwise be missing, and you will find Filament much easier and faster to understand and use.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ This will create several files in the `app/Filament/Resources` directory:
|
||||
|
||||
Your new resource class lives in `CustomerResource.php`.
|
||||
|
||||
The classes in the `Pages` directory are used to customize the pages in the admin panel that interact with your resource. They're all full-page [Livewire](https://laravel-livewire.com) components that you can customize in any way you wish.
|
||||
The classes in the `Pages` directory are used to customize the pages in the app that interact with your resource. They're all full-page [Livewire](https://laravel-livewire.com) components that you can customize in any way you wish.
|
||||
|
||||
> Have you created a resource, but it's not appearing in the navigation menu? If you have a [model policy](#authorization), make sure you return `true` from the `viewAny()` method.
|
||||
|
||||
@@ -62,7 +62,7 @@ php artisan make:filament-resource Customer --generate
|
||||
|
||||
### Handling soft deletes
|
||||
|
||||
By default, you will not be able to interact with deleted records in the admin panel. If you'd like to add functionality to restore, force delete and filter trashed records in your resource, use the `--soft-deletes` flag when generating the resource:
|
||||
By default, you will not be able to interact with deleted records in the app. If you'd like to add functionality to restore, force delete and filter trashed records in your resource, use the `--soft-deletes` flag when generating the resource:
|
||||
|
||||
```bash
|
||||
php artisan make:filament-resource Customer --soft-deletes
|
||||
@@ -299,7 +299,7 @@ protected static function getNavigationGroup(): ?string
|
||||
|
||||
Within Filament, every query to your resource model will start with the `getEloquentQuery()` method.
|
||||
|
||||
Because of this, it's very easy to apply your own [model scopes](https://laravel.com/docs/eloquent#query-scopes) that affect the entire resource. You can use this to implement [multi-tenancy](#multi-tenancy) easily within the admin panel.
|
||||
Because of this, it's very easy to apply your own [model scopes](https://laravel.com/docs/eloquent#query-scopes) that affect the entire resource. You can use this to implement [multi-tenancy](#multi-tenancy) easily within the app.
|
||||
|
||||
### Disabling global scopes
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ title: Deleting records
|
||||
|
||||
## Creating a resource with soft deletes
|
||||
|
||||
By default, you will not be able to interact with deleted records in the admin panel. If you'd like to add functionality to restore, force delete and filter trashed records in your resource, use the `--soft-deletes` flag when generating the resource:
|
||||
By default, you will not be able to interact with deleted records in the app. If you'd like to add functionality to restore, force delete and filter trashed records in your resource, use the `--soft-deletes` flag when generating the resource:
|
||||
|
||||
```bash
|
||||
php artisan make:filament-resource Customer --soft-deletes
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Managing relationships
|
||||
|
||||
## Choosing the right tool for the job
|
||||
|
||||
Filament provides many ways to manage relationships in the admin panel. Which feature you should use depends on the type of relationship you are managing, and which UI you are looking for.
|
||||
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.
|
||||
|
||||
### Relation managers - interactive tables underneath your resource forms
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Global search
|
||||
---
|
||||
|
||||
Global search allows you to search across all of your resource records, from anywhere in the admin panel.
|
||||
Global search allows you to search across all of your resource records, from anywhere in the app.
|
||||
|
||||
## Title
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
Filament allows you to create completely custom pages for the admin panel.
|
||||
Filament allows you to create completely custom pages for the app.
|
||||
|
||||
## Creating a page
|
||||
|
||||
@@ -14,7 +14,7 @@ php artisan make:filament-page Settings
|
||||
|
||||
This command will create two files - a page class in the `/Pages` directory of the Filament directory, and a view in the `/pages` directory of the Filament views directory.
|
||||
|
||||
Page classes are all full-page [Livewire](https://laravel-livewire.com) components with a few extra utilities you can use with the admin panel.
|
||||
Page classes are all full-page [Livewire](https://laravel-livewire.com) components with a few extra utilities you can use with the App Framework.
|
||||
|
||||
## Conditionally hiding pages in navigation
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
title: Users
|
||||
---
|
||||
|
||||
By default, all `App\Models\User`s can access Filament locally. To allow them to access Filament in production, you must take a few extra steps to ensure that only the correct users have access to the admin panel.
|
||||
By default, all `App\Models\User`s can access Filament locally. To allow them to access Filament in production, you must take a few extra steps to ensure that only the correct users have access to the app.
|
||||
|
||||
## Authorizing access to the admin panel
|
||||
## Authorizing access to the app
|
||||
|
||||
To set up your `App\Models\User` to access Filament in non-local environments, you must implement the `FilamentUser` contract:
|
||||
|
||||
@@ -58,7 +58,7 @@ The `getFilamentAvatarUrl()` method is used to retrieve the avatar of the curren
|
||||
|
||||
## Configuring the name attribute
|
||||
|
||||
By default, Filament will use the `name` attribute of the user to display their name in the admin panel. To change this, you can implement the `HasName` contract:
|
||||
By default, Filament will use the `name` attribute of the user to display their name in the app. To change this, you can implement the `HasName` contract:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
@@ -4,17 +4,17 @@ title: Notifications
|
||||
|
||||
## Sending notifications
|
||||
|
||||
The admin panel uses the [Notifications](../notifications/sending-notifications) package to send messages to users.
|
||||
The App Framework uses the [Notifications](../notifications/sending-notifications) package to send messages to users.
|
||||
|
||||
Please read the [documentation](../notifications/sending-notifications) to discover how to send notifications easily.
|
||||
|
||||
However, there are a few differences in configuration when using the admin panel.
|
||||
However, there are a few differences in configuration when using the App Framework.
|
||||
|
||||
## Database notifications
|
||||
|
||||
Instead of enabling database notifications inside the notifications package, you must enable it for the admin panel specifically.
|
||||
Instead of enabling database notifications inside the notifications package, you must enable it for the App Framework specifically.
|
||||
|
||||
First, you must [publish the configuration file](installation#publishing-configuration) for the admin panel.
|
||||
First, you must [publish the configuration file](installation#publishing-configuration) for the App Framework.
|
||||
|
||||
Now, enable database notifications:
|
||||
|
||||
@@ -41,7 +41,7 @@ Some features of the notifications package, including [receiving real-time datab
|
||||
|
||||
Firstly, you must set up a [server-side websockets integration](https://laravel.com/docs/broadcasting#server-side-installation) like Pusher.
|
||||
|
||||
Then, define your Echo configuration within the admin panel [configuration file](installation#publishing-configuration):
|
||||
Then, define your Echo configuration within the App Framework [configuration file](installation#publishing-configuration):
|
||||
|
||||
```php
|
||||
'broadcasting' => [
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Appearance
|
||||
|
||||
## Changing the brand logo
|
||||
|
||||
By default, Filament will use your app's name as a brand logo in the admin panel.
|
||||
By default, Filament will use your app's name as a brand logo.
|
||||
|
||||
You may create a `resources/views/vendor/filament/components/brand.blade.php` file to provide a custom logo:
|
||||
|
||||
@@ -20,11 +20,11 @@ By default, Filament only includes a light theme. However, you may allow the use
|
||||
'dark_mode' => true,
|
||||
```
|
||||
|
||||
When dark mode is enabled, the admin panel will automatically obey your system's dark / light mode preference. You may switch to dark / light mode permanently through the button in the user dropdown menu.
|
||||
When dark mode is enabled, the design will automatically obey your system's dark / light mode preference. You may switch to dark / light mode permanently through the button in the user dropdown menu.
|
||||
|
||||
If you're using a [custom theme](#building-themes), make sure that you have the `darkMode: 'class'` setting in your `tailwind.config.js` file.
|
||||
|
||||
> Please note: before enabling dark mode in production, please thoroughly test your admin panel - especially third party plugins, which may not be properly tested with dark mode.
|
||||
> Please note: before enabling dark mode in production, please thoroughly test your app - especially third party plugins, which may not be properly tested with dark mode.
|
||||
|
||||
When the user toggles between dark or light mode, a browser event called **dark-mode-toggled** is dispatched. You can listen to it:
|
||||
|
||||
@@ -112,7 +112,7 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
You may specify your own colors, which will be used throughout the admin panel.
|
||||
You may specify your own colors, which will be used throughout the app.
|
||||
|
||||
If you use Vite to compile assets, in your `vite.config.js` file, register the `filament.css` theme file:
|
||||
|
||||
@@ -244,7 +244,7 @@ In `config/filament.php`, set the `layouts.notifications.alignment` to any value
|
||||
|
||||
## Render hooks
|
||||
|
||||
Filament allows you to render Blade content at various points in the admin panel layout. This is useful for integrations with packages like [`wire-elements/modal`](https://github.com/wire-elements/modal) which require you to add a Livewire component to your app.
|
||||
Filament allows you to render Blade content at various points in the app layout. This is useful for integrations with packages like [`wire-elements/modal`](https://github.com/wire-elements/modal) which require you to add a Livewire component to your app.
|
||||
|
||||
Here's an example, integrating [`wire-elements/modal`](https://github.com/wire-elements/modal) with Filament in a service provider:
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ title: Testing
|
||||
|
||||
All examples in this guide will be written using [Pest](https://pestphp.com). However, you can easily adapt this to a PHPUnit.
|
||||
|
||||
Since all pages in the admin panel are Livewire components, we're just using Livewire testing helpers everywhere. If you've never tested Livewire components before, please read [this guide](https://laravel-livewire.com/docs/testing) from the Livewire docs.
|
||||
Since all pages in the app are Livewire components, we're just using Livewire testing helpers everywhere. If you've never tested Livewire components before, please read [this guide](https://laravel-livewire.com/docs/testing) from the Livewire docs.
|
||||
|
||||
## Getting started
|
||||
|
||||
Ensure that you are authenticated to access the admin panel in your `TestCase`:
|
||||
Ensure that you are authenticated to access the app in your `TestCase`:
|
||||
|
||||
```php
|
||||
protected function setUp(): void
|
||||
|
||||
@@ -186,7 +186,7 @@ If you had customized the `path`, `domain` or `default_filesystem_disk`, you sho
|
||||
|
||||
### Users
|
||||
|
||||
Filament v2.x does not include a dedicated `filament_users` table as it did in v1.x. By default, all `App\Models\User`s can access the admin panel locally, and in production you must apply the `FilamentUser` interface to the model to control admin access. You can read more about this [here](users).
|
||||
Filament v2.x does not include a dedicated `filament_users` table as it did in v1.x. By default, all `App\Models\User`s can access the app locally, and in production you must apply the `FilamentUser` interface to the model to control admin access. You can read more about this [here](users).
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
**Using forms inside the [App Framework](../app)**? You can skip this installation. This guide is for people who want to use the package inside their custom TALL-stack app.
|
||||
|
||||
## Requirements
|
||||
|
||||
Filament has a few requirements to run:
|
||||
@@ -10,8 +12,6 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
Actions come pre-installed inside the [admin panel 3.x](/docs/admin/3.x), but you must still follow the installation instructions below if you're using it in the rest of your app.
|
||||
|
||||
First, require the actions package using Composer:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -76,7 +76,7 @@ use Filament\Forms\Components\TextInput;
|
||||
TextInput::make('name')->default('John')
|
||||
```
|
||||
|
||||
Note that inside the admin panel this only works on Create Pages, as Edit Pages will always fill the data from the model.
|
||||
Note that inside the App Framework this only works on Create Pages, as Edit Pages will always fill the data from the model.
|
||||
|
||||
## Helper messages and hints
|
||||
|
||||
@@ -171,7 +171,7 @@ Toggle::make('is_admin')
|
||||
->dehydrated(auth()->user()->isAdmin())
|
||||
```
|
||||
|
||||
If you're using the [admin panel](/docs/admin) and only want to save disabled fields on the [Create page of a resource](/docs/admin/resources):
|
||||
If you're using the [App Framework](../../app) and only want to save disabled fields on the [Create page of a resource](/docs/admin/resources):
|
||||
|
||||
```php
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
@@ -127,7 +127,7 @@ Select::make('technologies')
|
||||
->relationship('technologies', 'name')
|
||||
```
|
||||
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [App Framework](../../app), you can skip this step.
|
||||
|
||||
### Preloading relationship options
|
||||
|
||||
@@ -200,7 +200,7 @@ Select::make('authorId')
|
||||
|
||||
The form opens in a modal, where the user can fill it with data. Upon form submission, the new record is selected by the field.
|
||||
|
||||
Since HTML does not support nested `<form>` elements, you must also render the modal outside the `<form>` in the view. If you're using the [admin panel](/docs/admin), this is included already:
|
||||
Since HTML does not support nested `<form>` elements, you must also render the modal outside the `<form>` in the view. If you're using the [App Framework](../../app), this is included already:
|
||||
|
||||
```blade
|
||||
<form wire:submit.prevent="submit">
|
||||
|
||||
@@ -82,7 +82,7 @@ CheckboxList::make('technologies')
|
||||
->relationship('technologies', 'name')
|
||||
```
|
||||
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [App Framework](../../app), you can skip this step.
|
||||
|
||||
You may customize the database query that retrieves options using the third parameter of the `relationship()` method:
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ Repeater::make('qualifications')
|
||||
])
|
||||
```
|
||||
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [App Framework](../../app), you can skip this step.
|
||||
|
||||
### Ordering items
|
||||
|
||||
|
||||
@@ -92,4 +92,4 @@ Fieldset::make('Metadata')
|
||||
|
||||
In this example, the `title`, `description` and `image` are automatically loaded from the `metadata` relationship, and saved again when the form is submitted. If the `metadata` record does not exist, it is automatically created.
|
||||
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> To set this functionality up, **you must also follow the instructions set out in the [field relationships](getting-started#field-relationships) section**. If you're using the [App Framework](../../app), you can skip this step.
|
||||
|
||||
@@ -23,7 +23,7 @@ Wizard::make([
|
||||
])
|
||||
```
|
||||
|
||||
> We have different setup instructions you're looking to add a wizard to an admin panel [resource Create page](../admin/resources/creating-records#wizards) or a table [action](../tables/actions#wizards). Following that documentation will ensure that the ability to submit the form is only available on the last step.
|
||||
> We have different setup instructions you're looking to add a wizard to an App Framework [resource Create page](../../app/resources/creating-records#wizards) or a table [action](../tables/actions#wizards). Following that documentation will ensure that the ability to submit the form is only available on the last step.
|
||||
|
||||
Each step has a mandatory label. You may optionally also add a description for extra detail:
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ Sometimes, you may wish to ignore a given model during unique validation. For ex
|
||||
Field::make('email')->unique(ignorable: $ignoredUser)
|
||||
```
|
||||
|
||||
If you're using the [admin panel](/docs/admin), you can easily ignore the current record by using `ignoreRecord` instead:
|
||||
If you're using the [App Framework](../app), you can easily ignore the current record by using `ignoreRecord` instead:
|
||||
|
||||
```php
|
||||
Field::make('email')->unique(ignoreRecord: true)
|
||||
@@ -482,7 +482,7 @@ protected function onValidationError(ValidationException $exception): void
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, if you are using admin panel and you want this behaviour on all the pages, add this inside the `boot()` method of your `AppServiceProvider`:
|
||||
Alternatively, if you are using the App Framework and you want this behaviour on all the pages, add this inside the `boot()` method of your `AppServiceProvider`:
|
||||
|
||||
```php
|
||||
use Filament\Notifications\Notification;
|
||||
|
||||
@@ -96,7 +96,7 @@ function (Set $set) {
|
||||
}
|
||||
```
|
||||
|
||||
If you're writing a form for an admin panel resource or relation manager, and you wish to check if a form is `create`, `edit` or `view`, use the `$context` parameter:
|
||||
If you're writing a form for an App Framework resource or relation manager, and you wish to check if a form is `create`, `edit` or `view`, use the `$context` parameter:
|
||||
|
||||
```php
|
||||
function (string $context) {
|
||||
@@ -104,7 +104,7 @@ function (string $context) {
|
||||
}
|
||||
```
|
||||
|
||||
> Outside of the admin panel, you can set a form's context by using the `context()` method on your `$form` definition.
|
||||
> Outside of the App Framework, you can set a form's context by using the `context()` method on your `$form` definition.
|
||||
|
||||
Callbacks are evaluated using Laravel's `app()->call()` under the hood, so you are able to combine multiple parameters in any order:
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
**Using notifications inside the [App Framework](../app)**? You can skip this installation. This guide is for people who want to use the package inside their custom TALL-stack app.
|
||||
|
||||
## Requirements
|
||||
|
||||
Filament has a few requirements to run:
|
||||
@@ -10,8 +12,6 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
Actions come pre-installed inside the [admin panel 3.x](/docs/admin/3.x), but you must still follow the installation instructions below if you're using it in the rest of your app.
|
||||
|
||||
First, require the actions package using Composer:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -12,7 +12,7 @@ SpatieMediaLibraryFileUpload::make('avatar'),
|
||||
|
||||
The media library file upload supports all the customization options of the [original file upload component](/docs/forms/fields/file-upload).
|
||||
|
||||
> The field will automatically load and save its uploads to your model. To set this functionality up, **you must also follow the instructions set out in the [field relationships](/docs/forms/getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> The field will automatically load and save its uploads to your model. To set this functionality up, **you must also follow the instructions set out in the [field relationships](/docs/forms/getting-started#field-relationships) section**. If you're using the [App Framework](../app), you can skip this step.
|
||||
|
||||
## Passing a collection
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ protected static string $settings = FooterSettings::class;
|
||||
|
||||
You must define a form schema to interact with your settings class inside the `getFormSchema()` method.
|
||||
|
||||
Since the [form builder](/docs/forms) is installed in the admin panel by default, you may use any form [fields](/docs/forms/fields) or [layout components](/docs/forms/layout) you like:
|
||||
Since the [form builder](/docs/forms) is installed in the App Framework by default, you may use any form [fields](/docs/forms/fields) or [layout components](/docs/forms/layout) you like:
|
||||
|
||||
```php
|
||||
use Filament\Forms\Components\Repeater;
|
||||
|
||||
@@ -12,7 +12,7 @@ use Filament\Forms\Components\SpatieTagsInput;
|
||||
SpatieTagsInput::make('tags'),
|
||||
```
|
||||
|
||||
> The field will automatically load and save its tags to your model. To set this functionality up, **you must also follow the instructions set out in the [field relationships](/docs/forms/getting-started#field-relationships) section**. If you're using the [admin panel](/docs/admin), you can skip this step.
|
||||
> The field will automatically load and save its tags to your model. To set this functionality up, **you must also follow the instructions set out in the [field relationships](/docs/forms/getting-started#field-relationships) section**. If you're using the [App Framework](../app), you can skip this step.
|
||||
|
||||
Optionally, you may pass a [`type()`](https://spatie.be/docs/laravel-tags/advanced-usage/using-types) allows you to group tags into collections:
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
**Using tables inside the [App Framework](../app)**? You can skip this installation. This guide is for people who want to use the package inside their custom TALL-stack app.
|
||||
|
||||
## Requirements
|
||||
|
||||
Filament has a few requirements to run:
|
||||
@@ -10,8 +12,6 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
Actions come pre-installed inside the [admin panel 3.x](/docs/admin/3.x), but you must still follow the installation instructions below if you're using it in the rest of your app.
|
||||
|
||||
First, require the actions package using Composer:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -15,7 +15,7 @@ protected function getTableColumns(): array
|
||||
}
|
||||
```
|
||||
|
||||
If you're using them in admin panel resources or relation managers, you must put them in the `$table->columns()` method:
|
||||
If you're using them in App Framework resources or relation managers, you must put them in the `$table->columns()` method:
|
||||
|
||||
```php
|
||||
public static function table(Table $table): Table
|
||||
@@ -317,7 +317,7 @@ Tables\Columns\TextColumn::make('amount_including_vat')
|
||||
|
||||
## Tooltips
|
||||
|
||||
> If you want to use tooltips outside of the admin panel, make sure you have [`@ryangjchandler/alpine-tooltip` installed](https://github.com/ryangjchandler/alpine-tooltip#installation) in your app, including [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager). You'll also need to install [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager) if you're using a [custom admin theme](/docs/admin/appearance#building-themes).
|
||||
> If you want to use tooltips outside of the App Framework, make sure you have [`@ryangjchandler/alpine-tooltip` installed](https://github.com/ryangjchandler/alpine-tooltip#installation) in your app, including [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager). You'll also need to install [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager) if you're using a [custom App Framework theme](../../app/appearance#building-themes).
|
||||
|
||||
You may specify a tooltip to display when you hover over a cell:
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ protected function getTableFilters(): array
|
||||
}
|
||||
```
|
||||
|
||||
If you're using them in admin panel resources or relation managers, you must put them in the `$table->filters()` method:
|
||||
If you're using them in App Framework resources or relation managers, you must put them in the `$table->filters()` method:
|
||||
|
||||
```php
|
||||
public static function table(Table $table): Table
|
||||
|
||||
@@ -19,7 +19,7 @@ protected function getTableActions(): array
|
||||
}
|
||||
```
|
||||
|
||||
If you're using them in admin panel resources or relation managers, you must put them on the `$table`:
|
||||
If you're using them in App Framework resources or relation managers, you must put them on the `$table`:
|
||||
|
||||
```php
|
||||
public static function table(Table $table): Table
|
||||
@@ -59,7 +59,7 @@ protected function getTableBulkActions(): array
|
||||
}
|
||||
```
|
||||
|
||||
If you're using them in admin panel resources or relation managers, you must put them on the `$table`:
|
||||
If you're using them in App Framework resources or relation managers, you must put them on the `$table`:
|
||||
|
||||
```php
|
||||
public static function table(Table $table): Table
|
||||
@@ -441,7 +441,7 @@ Row actions are aligned to the right in their cell by default. To change the ali
|
||||
|
||||
## Tooltips
|
||||
|
||||
> If you want to use tooltips outside of the admin panel, make sure you have [`@ryangjchandler/alpine-tooltip` installed](https://github.com/ryangjchandler/alpine-tooltip#installation) in your app, including [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager). You'll also need to install [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager) if you're using a [custom admin theme](/docs/admin/appearance#building-themes).
|
||||
> If you want to use tooltips outside of the App Framework, make sure you have [`@ryangjchandler/alpine-tooltip` installed](https://github.com/ryangjchandler/alpine-tooltip#installation) in your app, including [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager). You'll also need to install [`tippy.css`](https://atomiks.github.io/tippyjs/v6/getting-started/#1-package-manager) if you're using a [custom App Framework theme](../../app/appearance#building-themes).
|
||||
|
||||
You may specify a tooltip to display when you hover over an action:
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ use Filament\Tables\Columns\TextColumn;
|
||||
|
||||
### Adding a collapse animation
|
||||
|
||||
If you're not using the table builder within the admin panel, you may find that there is no animation when collapsing or expanding the content. You can enable this by installing the [Alpine.js Collapse Plugin](https://alpinejs.dev/plugins/collapse):
|
||||
If you're not using the table builder within the App Framework, you may find that there is no animation when collapsing or expanding the content. You can enable this by installing the [Alpine.js Collapse Plugin](https://alpinejs.dev/plugins/collapse):
|
||||
|
||||
```bash
|
||||
npm install @alpinejs/collapse --save-dev
|
||||
@@ -291,7 +291,7 @@ protected function getTableContentGrid(): ?array
|
||||
}
|
||||
```
|
||||
|
||||
Or if you're using admin panel resources or relation managers, you must define a `$table->contentGrid()` method:
|
||||
Or if you're using App Framework resources or relation managers, you must define a `$table->contentGrid()` method:
|
||||
|
||||
```php
|
||||
public static function table(Table $table): Table
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
**Using widgets inside the [App Framework](../app)**? You can skip this installation. This guide is for people who want to use the package inside their custom TALL-stack app.
|
||||
|
||||
## Requirements
|
||||
|
||||
Filament has a few requirements to run:
|
||||
@@ -10,8 +12,6 @@ Filament has a few requirements to run:
|
||||
- Laravel v8.0+
|
||||
- Livewire v2.0+
|
||||
|
||||
Actions come pre-installed inside the [admin panel 3.x](/docs/admin/3.x), but you must still follow the installation instructions below if you're using it in the rest of your app.
|
||||
|
||||
First, require the actions package using Composer:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user