|
<?php
|
|
|
|
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");
|
|
}
|
|
}
|
|
|