v0.1.5bb made the controller for deleting a user
This commit is contained in:
parent
8d883793cc
commit
7c5345ac8a
|
@ -3,11 +3,11 @@
|
||||||
require "accessControl.php";
|
require "accessControl.php";
|
||||||
require "../../bootstrap.php";
|
require "../../bootstrap.php";
|
||||||
|
|
||||||
use Backend\Model\Post;
|
use Backend\Model\User;
|
||||||
|
|
||||||
if(isset($_POST['delete_id'])){
|
if(isset($_POST['delete_id'])){
|
||||||
$id = $_POST['delete_id'];
|
$id = $_POST['delete_id'];
|
||||||
$findId = Post::query()->findOrFail($id);
|
$findId = User::query()->findOrFail($id);
|
||||||
if(!$findId->delete()){
|
if(!$findId->delete()){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue