app/Http/Controllers/AlbumItemsController.php
/**
     * Set item as profile picture
     *
     * @param AlbumItem $albumItem
     * @return \Illuminate\Http\RedirectResponse
     */
Set item as profile picture
@param AlbumItem $albumItem
@return \Illuminate\Http\RedirectResponse
Set item as profile picture @param AlbumItem $albumItem @return \ Illuminate \ Http \ RedirectResponse
public function asProfile(AlbumItem $albumItem)
    {
        $this->authorize($albumItem);
        $me = auth()->user();
        $me->setPictureAsProfile($albumItem->getFirstMedia());
        return redirect()->back()->with('success', trans('albums.image-set-as-profile'));
    }
public function asProfile ( AlbumItem $ albumItem ) { $ this -> authorize ( $ albumItem ) ; $ me = auth ( ) -> user ( ) ; $ me -> setPictureAsProfile ( $ albumItem -> getFirstMedia ( ) ) ; return redirect ( ) -> back ( ) -> with ( 'success' , trans ( 'albums.image-set-as-profile' ) ) ; }
Set item as profile picture
 @param AlbumItem $albumItem
 @return \Illuminate\Http\RedirectResponse
Set item as profile picture @param AlbumItem $albumItem @return \ Illuminate \ Http \ RedirectResponse
/** @var User $me */