app/Http/Controllers/ShopController.php
/**
     * Remove the specified resource from storage.
     *
     * @param Shop $shop
     * @return JsonResponse
     */
Remove the specified resource from storage.
@param Shop $shop
@return JsonResponse
Remove the specified resource from storage . @param Shop $shop @return JsonResponse
public function destroy(Shop $shop)
    {
        File::delete($shop->image);
        if ($shop->delete()) {
            return \response()->json(
                [
                    'error' => false,
                    'message' => 'Deleted'
                ]
            );
        }
        return \response()->json(
            [
                'error' => true,
                'message' => 'Something went wrong'
            ]
        );
    }
public function destroy ( Shop $ shop ) { File :: delete ( $ shop -> image ) ; if ( $ shop -> delete ( ) ) { return \ response ( ) -> json ( [ 'error' => false , 'message' => 'Deleted' ] ) ; } return \ response ( ) -> json ( [ 'error' => true , 'message' => 'Something went wrong' ] ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .