Skip to content

Commit

Permalink
Merge pull request #41 from tobiasla78/improve-readme
Browse files Browse the repository at this point in the history
improve readme
  • Loading branch information
bezhanSalleh committed Oct 17, 2023
2 parents 1e38da0 + de8d140 commit 0536042
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ php artisan vendor:publish --tag="filament-language-switch-views"
## Plugin Usage
Using the plugin is easy all you need to do is instanciate it to the `Panels` you want the plugin to be available in.
```php
use BezhanSalleh\FilamentLanguageSwitch\FilamentLanguageSwitchPlugin;

public function panel(Panel $panel): Panel
{
return $panel
Expand All @@ -73,6 +75,8 @@ public function panel(Panel $panel): Panel
By default the switch render in the `panels::global-search.after` hook but you can render the **Language Switch** in any of the [Render Hooks](https://beta.filamentphp.com/docs/3.x/panels/configuration#render-hooks) available in Filamentphp using the `renderHookName()` method inside your panel's `plugins()` method.

```php
use BezhanSalleh\FilamentLanguageSwitch\FilamentLanguageSwitchPlugin;

public function panel(Panel $panel): Panel
{
return $panel
Expand Down

0 comments on commit 0536042

Please sign in to comment.