Search
 
SCRIPT & CODE EXAMPLE
 

PHP

delete image from public folder in laravel

//Use File On top
use IlluminateSupportFacadesFile;
//then use the delete function
File::delete('abc/muhammad.jpg');
//location of file to delete is "public/abc/muhammad.jpg"
Comment

how to remove image from public storage in laravel

// import Storage class
use IlluminateSupportFacadesStorage;

Storage::disk('public')->delete('path-of-file');
Comment

PREVIOUS NEXT
Code Example
Php :: collection continue in laravel 
Php :: laravel blade short if 
Php :: php client enable short tags 
Php :: how to catch query exception in laravel 8 
Php :: laravel orwhere 
Php :: please provide a valid cache path. laravel 
Php :: display nav menu in frontend using Wordpress 
Php :: facebook neuer name 
Php :: how to add a text to image in php 
Php :: show html as text in php 
Php :: get http code curl php 
Php :: laravel dynamic page title 
Php :: DB::beginTransaction() 
Php :: for i php 
Php :: date 3 months ago for a particular date php 
Php :: to start XAMPP ubuntu 
Php :: php goto 
Php :: laravel clear table 
Php :: laravel api csrf token disable 
Php :: how to remove public from url in laravel 8 
Php :: artisan cache clear 
Php :: operador in laravel 
Php :: php check if folder empty 
Php :: php max value in associative array 
Php :: php parse html 
Php :: laravel include files 
Php :: password hashing in laravel 
Php :: Laravel Validation check array size min and max 
Php :: laravel new model 
Php :: php print array 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =