Example of Laravolt/avatar in agorakit/agorakit

File master/composer.json (link to Github)
{
  "require": {
    "php": "^7.3",
    //
    "laravolt/avatar": "^4"
  },
}
File app/Http/Controllers/UserCoverController.php (link to Github)
use App\User;
use Avatar;
use Storage;

class UserCoverController extends Controller
{
    public function show(User $user, $size = 'medium')
    {
        $avatar_path = storage_path().'/app/users/'.$user->id.'/cover.jpg';
        if (!File::exists($avatar_path)) {
            Storage::disk('local')->makeDirectory('users/'.$user->id);
            Avatar::create($user->name)
            ->setDimension(400, 400)
            ->setFontSize(200)
            ->save(storage_path().'/app/users/'.$user->id.'/generated_cover.png');
            $avatar_path = storage_path().'/app/users/'.$user->id.'/generated_cover.png';
        }
        //
    }
}

Additional resources on laravolt/avatar: