Download the PHP package devaslanphp/filament-avatar without Composer

On this page you can find all versions of the php package devaslanphp/filament-avatar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-avatar

Filament Avatar

Latest Version on Packagist Total Downloads

This package provides a complete and customizable User Avatar provider for your Filament project, and also for any project using a User Model.

For now the avatar providers implemented are

Provider Website & Docs
UI Avatar
Gravatar

Installation

You can install the package via composer:

Optionally: You can publish the package config file:

After you installed the package the only thing you need to do is to change the filament default_avatar_provider configuration to use FilamentUserAvatarProvider avatar provider:

That's it, Filament now will use the Avatar provider provided by this package.

Configuration

The configuration file of this package comes like below:

I think it's well documented, I will let you check it.

Custom provider

If you want to add your personalized avatar provider, Follow the below steps:

  1. Create a PHP class that implements a function get(Model $user): string (you can check \Devaslanphp\FilamentAvatar\Core\GravatarProvider)
  2. Add a new provider to config('filament-avatar.providers'), with class parameter where you will put your custom class (you can check the configuration file to make the same)
  3. Update the config('filament.default_avatar_provider') with your provider name

And that's it .

Pro tip

This package can be used outside of Filament too, you can add the trait Devaslanphp\FilamentAvatar\Core\HasAvatarUrl to your user model.

This trait will give you access to an appended attribute avatarUrl generated by the avatar provider, then you can use it as a src of your images.

Support

For fast support, please join the Filament community discord and send me a message in this channel #avatar-provider

Credits

License

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


All versions of filament-avatar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
spatie/laravel-package-tools Version ^1.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devaslanphp/filament-avatar contains the following files

Loading the files please wait ....