src/Http/Controllers/Adminarea/ManagersMediaController.php
public function destroy(Manager $manager, Media $media)
    {
        $manager->media()->where($media->getKeyName(), $media->getKey())->first()->delete();

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

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

@param \Cortex\Auth\Models\Manager       $manager
@param \Spatie\MediaLibrary\Models\Media $media

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