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(): string
    {
        $name = trim(collect(explode(' ', $this->name))->map(function ($segment) {
            return mb_substr($segment, 0, 1);
        })->join(' '));
        return url('storage/no_image.png');
    }
protected function defaultProfilePhotoUrl ( ) : string { $ name = trim ( collect ( explode ( ' ' , $ this -> name ) ) -> map ( function ( $ segment ) { return mb_substr ( $ segment , 0 , 1 ) ; } ) -> join ( ' ' ) ) ; return url ( 'storage/no_image.png' ) ; }
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 .