From 9b325679586ce6cda5f76547cb7e01c5fae65d45 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Sun, 21 Jan 2024 23:03:05 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=9E=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++-- docs/_index.md | 6 +-- docs/filament.md | 38 +++++++++++-------- docs/getting-started/changelog.md | 2 +- docs/getting-started/installation.md | 57 +++++++++++++++------------- docs/introduction.md | 32 +++++++++------- 6 files changed, 90 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 73e2862..c618db1 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,29 @@

-## features +## Features + - ๐Ÿ”ฅ configurable per panel -- ๐Ÿ”ฅ set the variant, size and color +- ๐Ÿ”ฅ set Variant (marble, beam, pixel, sunset, ring or bauhaus) +- ๐Ÿ”ฅ Custom size +- ๐Ÿ”ฅ Custom colors +- ๐Ÿ”ฅ Square avatars +- ๐Ÿ”ฅ Name, email or username ## Screenshots ![](https://larazeus.com/images/screenshots/boredom/boredom-1.png) ![](https://larazeus.com/images/screenshots/boredom/boredom-2.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-3.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-4.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-5.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-6.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-7.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-8.png) ## Demo -> Visit our demo site: https://demo.larazeus.com/admin/components-demo/boredom +> Visit our demo site: https://demo.larazeus.com/admin/users ## Full Documentation diff --git a/docs/_index.md b/docs/_index.md index 69177dd..26eddb1 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -1,7 +1,7 @@ --- title: v1 -slogan: filamentphp column to easily add a chart in filamentPHP table column -githubUrl: https://github.com/lara-zeus/inline-chart +slogan: use Boring Avatars as the default avatar provider in your FilamentPHP v3 application +githubUrl: https://github.com/lara-zeus/boredom branch: v1.x -icon: heroicon-o-chart-bar-square +icon: heroicon-o-light-bulb --- diff --git a/docs/filament.md b/docs/filament.md index 92a034a..2136d59 100644 --- a/docs/filament.md +++ b/docs/filament.md @@ -1,26 +1,32 @@ -# Zeus Inline Chart +# Zeus Boredom -Inline Chart is to easily add a chart in filamentPHP table column +use Boring Avatars as the default avatar provider in your FilamentPHP v3 application ## Features -- ๐Ÿ”ฅ Use any filament chart classes -- ๐Ÿ”ฅ Better tooltip -- ๐Ÿ”ฅ Use any widget type -- ๐Ÿ”ฅ Max Width -- ๐Ÿ”ฅ Polling +- ๐Ÿ”ฅ configurable per panel +- ๐Ÿ”ฅ set Variant (marble, beam, pixel, sunset, ring or bauhaus) +- ๐Ÿ”ฅ Custom size +- ๐Ÿ”ฅ Custom colors +- ๐Ÿ”ฅ Square avatars +- ๐Ÿ”ฅ Name, email or username ## Screenshots -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-1.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-2.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-3.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-4.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-1.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-2.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-3.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-4.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-5.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-6.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-7.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-8.png) ## More Details -**โœจ to learn more about Zeus Inline Chart, please visit:** -- [Discord](https://discord.com/channels/883083792112300104/1197986417855430820) -- [Docs](https://larazeus.com/docs/inline-chart) -- [Github](https://github.com/lara-zeus/inline-chart) -- [Demo](https://demo.larazeus.com/admin/components-demo/inline-chart) +**โœจ to learn more about Zeus Boredom, please visit:** + +- [Discord](#) +- [Docs](https://larazeus.com/docs/boredom) +- [Github](https://github.com/lara-zeus/boredom) +- [Demo](https://demo.larazeus.com/admin/components-demo/boredom) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index 1dc949e..233a8eb 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -3,4 +3,4 @@ title: Changelog weight: 100 --- -All changes to @zeus `Inline Chart` are auto updated documented on GitHub [changelog](https://github.com/lara-zeus/inline-chart/blob/1.x/CHANGELOG.md) +All changes to @zeus `Boredom` are auto updated documented on GitHub [changelog](https://github.com/lara-zeus/boredom/blob/1.x/CHANGELOG.md) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index ed818b7..1d03150 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -5,48 +5,53 @@ weight: 3 ## Installation -Install @zeus Inline Chart by running the following commands in your Laravel project directory. +Install @zeus Boredom by running the following commands in your Laravel project directory. ```bash -composer require lara-zeus/inline-chart +composer require lara-zeus/boredom ``` ## Usage: -### Create a New widget: +### set the avatar provider in your panel: -- first create a new widget using filament command: - -`art make:filament-widget MyTableWidgetChart` - -- change the extend of the class to use the abstract: - -`\LaraZeus\InlineChart\InlineChartWidget` +```php +->defaultAvatarProvider( + \LaraZeus\Boredom\BoringAvatarsProvider::class +) +``` -- available properties: +### register the plugin ```php -protected static ?string $maxHeight = '50px'; +\LaraZeus\Boredom\BoringAvatarPlugin::make() + ->variant(Variants::MARBLE) + ->size(60) + ->square() + ->colors(['0A0310','49007E','FF005B','FF7D10','FFB238']) +``` -protected int | string | array $columnSpan = 'full'; +## setup your User model -protected static ?string $heading = 'Chart'; +add the trait HasBoringAvatar to your User model: -public ?string $maxWidth = '!w-[150px]'; -``` +`use HasBoringAvatar;` + +and you can remove the method `getFilamentAvatarUrl` -and you can access the current row record using: `$this->record` in your chart data: +to overwrite the name: ```php -Model::where('child_id',$this->record->id) +public function avatarName(): Attribute +{ + return new Attribute( + get: fn () => $this->name // or $this->>email or $this->>username or Str::random() + ); +} ``` -### use it in your table: +to get the avatar outside filament: +`User::find(1)->avatar_url` -```php -\LaraZeus\InlineChart\Tables\Columns\InlineChart::make('last activities') - ->chart(MiniChart::class) - ->maxWidth('!w-[150px]') - ->description('description') - ->toggleable(), -``` +to use it in a resource: +`ImageColumn::make('avatar_url'),` \ No newline at end of file diff --git a/docs/introduction.md b/docs/introduction.md index b658b14..8d03f03 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -4,29 +4,35 @@ weight: 1 --- ## Introduction -@zeus Inline Chart to easily add a chart in filamentPHP table column -**[Demo](https://demo.larazeus.com/admin/components-demo/inline-chart) ยท [Github](https://github.com/lara-zeus/inline-chart) ยท [Discord](#)** +@zeus use Boring Avatars as the default avatar provider in your FilamentPHP v3 application + +**[Demo](https://demo.larazeus.com/admin/components-demo/boredom) ยท [Github](https://github.com/lara-zeus/boredom) ยท [Discord](#)** ## Features -- ๐Ÿ”ฅ Use any filament chart classes -- ๐Ÿ”ฅ Better tooltip -- ๐Ÿ”ฅ Use any widget type -- ๐Ÿ”ฅ Max Width -- ๐Ÿ”ฅ Polling +- ๐Ÿ”ฅ configurable per panel +- ๐Ÿ”ฅ set Variant (marble, beam, pixel, sunset, ring or bauhaus) +- ๐Ÿ”ฅ Custom size +- ๐Ÿ”ฅ Custom colors +- ๐Ÿ”ฅ Square avatars +- ๐Ÿ”ฅ Name, email or username ## Screenshots -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-1.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-2.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-3.png) -![](https://larazeus.com/images/screenshots/inline-chart/inline-chart-4.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-1.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-2.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-3.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-4.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-5.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-6.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-7.png) +![](https://larazeus.com/images/screenshots/boredom/boredom-8.png) ## Support Available support channels: -* Join our channel in discord [Discord](https://discord.com/channels/883083792112300104/1197986417855430820) -* Open an issue on [GitHub](https://github.com/lara-zeus/inline-chart/issues) +* Join our channel in discord [Discord](#) +* Open an issue on [GitHub](https://github.com/lara-zeus/boredom/issues) * Email us using the [contact center](https://larazeus.com/contact-us)