<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use File;
class DemoController extends Controller
{
/**
* Write code on Construct
*
* @return IlluminateHttpResponse
*/
public function removeImage(Request $request)
{
if(File::exists(public_path('upload/test.png'))){
File::delete(public_path('upload/test.png'));
}else{
dd('File does not exists.');
}
}
}