/**
* Check if a directory exists, if so delete it
* @param string $model
*/
public static function deleteDirectory($model)
{
$path = public_path('assets/img/' . $model->getTable() . '/' . $model->id);
if (\File::exists($path)) {
\File::deleteDirectory(public_path($path));
}
}