mrshanebarron/avatar
mrshanebarron/avatar is a Laravel package for generating and managing user avatars, with support for initials-based images, customizable colors and sizes, caching, and simple Blade/Eloquent integration so you can add profile pictures to your app in minutes.
composer require <vendor>/<package>) and let Laravel's package discovery register the service provider. No manual provider entry is needed unless discovery is disabled in your app.php artisan vendor:publish --tag=sb-config
As of v1.0.1 the published file is config/sb-<package>.php (note the sb- prefix). If you have an older un-prefixed config lingering from a pre-1.0.1 install, confirm which file the provider actually reads before editing — see Gotchas..env, not in the committed config.php artisan config:clear (and config:cache in deployed environments) so the new file is picked up.app(\Vendor\Package\Client::class)->ping();
This validates credentials, endpoint configuration, and the config file resolve path in one step.new. Use constructor injection or app(...) so tests can swap fakes and so any singleton bindings (HTTP client, cache store) are shared.config('sb-<package>.*') rather than hardcoding values. Read config at call time, not in the service provider's register(), otherwise config:cache and per-test overrides won't take effect.config()->set('sb-<package>.driver', 'fake') in setUp() and restore afterwards, or lean on the package's fake/swap helper if one is exposed.sb-<package> keys from a per-environment config overlay (config/sb-<package>.php in env()-aware form) instead of branching in application code.sb- prefix. If you previously published the un-prefixed file, it will not be overwritten by a normal vendor:publish (which skips existing files), and a stale un-prefixed config can sit next to the new one causing confusion. Delete the old file, re-publish with --force, and diff your customisations back in. Do not blanket --force in production without a backup.php artisan config:clear. In production, rebuild with php artisan config:cache as part of deploy.sb-config); vendor:publish without a tag may publish assets/migrations you don't want, or nothing at all if tags aren't registered.boot(), ensure ordering or defer the read until after all providers have registered.php artisan tinker → config('sb-<package>') dumps the effective merged config (package defaults + your overrides), which is the fastest way to confirm the prefixed file is the one loaded.How can I help you explore Laravel packages today?