Files
citrus-cms/resources/views/admin-ajax/user-delete.blade.php
T
2026-04-28 21:15:09 +03:00

31 lines
601 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
$p = $request->all();
$u = u();
if($p['id']<$u->id) {
} else {
if($u->level!="Admin") {
$user = User::where('id', $p['id'])->where("uid",$u->id)->delete();
$return = back()->with("mesaj","Kullanıcı silindi");
echo $return;
} else {
$user = User::where('id', $p['id'])->delete();
$return = back()->with("mesaj","Kullanıcı silindi");
echo $return;
}
}