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 "../../bootstrap.php";
|
||||
|
||||
use Backend\Model\Post;
|
||||
use Backend\Model\User;
|
||||
|
||||
if(isset($_POST['delete_id'])){
|
||||
$id = $_POST['delete_id'];
|
||||
$findId = Post::query()->findOrFail($id);
|
||||
$findId = User::query()->findOrFail($id);
|
||||
if(!$findId->delete()){
|
||||
return 0;
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue