hi guys i am trying to delete the file while delete the product from the database but it show me errero and i didn't found any solution
public function supprod($id,Request $request)
{
$produits=Produit::find($id);
$produits->delete();
$filename=(string)$document->nom;
Storage::disk('fichier')->delete($filename);
return redirect()->back();
}
Aucun commentaire:
Enregistrer un commentaire