2021-06-02 07:01:51 +00:00
|
|
|
<?php
|
2021-06-02 07:23:08 +00:00
|
|
|
|
|
|
|
require "../../bootstrap.php";
|
|
|
|
|
|
|
|
use Backend\Model\Post;
|
|
|
|
|
|
|
|
if(isset($_GET['id'])){
|
|
|
|
$id = $_GET['id'];
|
|
|
|
$findId = Post::query()->findOrFail($id);
|
|
|
|
|
|
|
|
if(!$findId->delete()){
|
|
|
|
echo "Error could not delete record";
|
|
|
|
}else{
|
|
|
|
header("location: ../../Frontend/home.php?recordDeleted");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|