Skip to content

Commit

Permalink
update discord URL
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Sep 9, 2024
1 parent aa35866 commit b6107f9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) php coder
Copyright (c) Lara Zeus (Ash)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
## Support

available support channels:
* using our channel `#filament-plugin-tools` on [Discord](#)
* using our channel `#filament-plugin-tools` on [Discord](https://discord.com/channels/883083792112300104/1282764457872719903)
* email us using the [contact center](https://larazeus.com/contact-us)

## Contributing
Expand Down
50 changes: 50 additions & 0 deletions docs/taits/globally-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Can Globally Search
weight: 4
---

## Global Search

you can let your user customize the Global Search for a resource

to implement this, add the trait to yor plugin:

```php
class MyAwesomePlugin extends FilamentPluginTools implements Plugin
{
use CanGloballySearch;
}
```

and defined the default searchs:

```php
public array $defaultGloballySearchableAttributes = [
AwesomeResource::class => ['title', 'slug'],
];
```

in your resource you can get the configuration like:

```php
public static function getGloballySearchableAttributes(): array
{
return MyAwesomePlugin::get()->getGlobalAttributes(static::class);
}
```

Now, your users can configure the global search in the panel:

```php
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
MyAwesomePlugin::make()
->hideResources([
AwesomeResource::class,
]),
]);
}
```
2 changes: 1 addition & 1 deletion docs/taits/hide-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function shouldRegisterNavigation(): bool
}
```

Now, if your users can hide any resource:
Now, your users can hide any resource:

```php
public function panel(Panel $panel): Panel
Expand Down

0 comments on commit b6107f9

Please sign in to comment.