app/Models/User.php
/**
     * Get the default profile photo URL if no profile photo has been uploaded.
     *
     * @return string
     */
Get the default profile photo URL if no profile photo has been uploaded.
@return string
Get the default profile photo URL if no profile photo has been uploaded . @return string
protected function defaultProfilePhotoUrl()
    {
        $name = trim(collect(explode(' ', $this->name))->map(function ($segment) {
            return mb_substr($segment, 0, 1);
        })->join(' '));
        return 'https://ui-avatars.com/api/?name='.urlencode($name).'&bold=true&size=512';
    }
protected function defaultProfilePhotoUrl ( ) { $ name = trim ( collect ( explode ( ' ' , $ this -> name ) ) -> map ( function ( $ segment ) { return mb_substr ( $ segment , 0 , 1 ) ; } ) -> join ( ' ' ) ) ; return 'https://ui-avatars.com/api/?name=' . urlencode ( $ name ) . '&bold=true&size=512' ; }
Get the default profile photo URL if no profile photo has been uploaded.
Get the default profile photo URL if no profile photo has been uploaded .