swatty007/nova-easy-avatars

Additional Plug & Play Avatars for your Nova Panel.

1.0.0 2021-03-01 19:15 UTC

This package is auto-updated.

Last update: 2024-03-29 04:06:15 UTC


README

Package Banner

Latest Version on Packagist License: MIT Quality Score Total Downloads

A small set of additional Avatars types to extend your Nova Panel. Plug & Play.

Installation

You can install the package via composer:

composer require swatty007/nova-easy-avatars

Configuration

All fields work without any additional configuration out of the box. You can however, overwrite their Name & Attribute fields to your liking as on any other Nova field. Furthermore, you can control the size of your avatars with the setSize() && setFontSize()(Initials only) method.

The Laravolt based Initials field gives you some extra controls over the look & feel of your Avatar via its configuration file. For details check out the package's documentation under: https://github.com/laravolt/avatar

This is helpful, if you want to generate Avatars with a unique color scheme, which matches your application!

Usage

You can use all available Avatar fields in the same way as Novas build in fields.

use Swatty007\NovaEasyAvatars\Fields\Initials;

public function fields(Request $request)
    {
        return [
            ...
            Initials::make('Avatar', 'name')
                    ->setSize(350),
            ...
        ]
    

The package currently supports the following Avatar Types:

Changelog

Please see CHANGELOG for more information what has changed recently.

TODO

  • If someone has an idea how to write tests for Nova fields, pull Requests are welcome 🧐

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@martin-niehoff.de instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.