v0.1.0 - Updated Deletetion of post
Updated home to admin Updated create & fetch Added DataTables Added Icons for DataTables Added SWAL
This commit is contained in:
@@ -9,9 +9,9 @@ if(isset($_POST['delete_id'])){
|
||||
$id = $_POST['delete_id'];
|
||||
$findId = Post::query()->findOrFail($id);
|
||||
if(!$findId->delete()){
|
||||
return "Error could not delete";
|
||||
return 0;
|
||||
}else{
|
||||
return "Record deleted";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user