src/Http/Controllers/Tenantarea/AccountMediaController.php
public function destroy(Member $member, Media $media)
    {
        $member->media()->where($media->getKeyName(), $media->getKey())->first()->delete();

        return intend([
            'url' => route('frontarea.account.settings'),
            'with' => [
                'warning' => trans('cortex/foundation::messages.resource_deleted', [
                    'resource' => trans('cortex/foundation::common.media'),
                    'identifier' => $media->getRouteKey(),
                ]),
            ],
        ]);
    }
public function destroy(Member $member, Media $media)
    {
        $member->media()->where($media->getKeyName(), $media->getKey())->first()->delete();

        return intend([
            'url' => route('frontarea.account.settings'),
            'with' => [
                'warning' => trans('cortex/foundation::messages.resource_deleted', [
                    'resource' => trans('cortex/foundation::common.media'),
                    'identifier' => $media->getRouteKey(),
                ]),
            ],
        ]);
    }
public function destroy ( Member $ member , Media $ media ) { $ member -> media ( ) -> where ( $ media -> getKeyName ( ) , $ media -> getKey ( ) ) -> first ( ) -> delete ( ) ; return intend ( [ 'url' => route ( 'frontarea.account.settings' ) , 'with' => [ 'warning' => trans ( 'cortex/foundation::messages.resource_deleted' , [ 'resource' => trans ( 'cortex/foundation::common.media' ) , 'identifier' => $ media -> getRouteKey ( ) , ] ) , ] , ] ) ; }
Destroy given member media.

@param \Cortex\Auth\Models\Member        $member
@param \Spatie\MediaLibrary\Models\Media $media

@return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
Destroy given member media .