some
This commit is contained in:
@ -82,6 +82,16 @@ class UserService
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function getAuthUserId(): string
|
||||
{
|
||||
$user = self::getAuthUser();
|
||||
if ($user){
|
||||
return $user->id;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function getAuthUserPhoto(): string|null
|
||||
{
|
||||
$user = self::getAuthUser();
|
||||
|
@ -17,13 +17,15 @@ use kernel\widgets\IconBtn\IconBtnDeleteWidget;
|
||||
use kernel\widgets\IconBtn\IconBtnEditWidget;
|
||||
use kernel\widgets\IconBtn\IconBtnViewWidget;
|
||||
|
||||
$get = (new \kernel\Request())->get();
|
||||
|
||||
$table = new ListEloquentTable(new EloquentDataProvider(User::class, [
|
||||
'currentPage' => $page_number,
|
||||
'perPage' => 3,
|
||||
'params' => ["class" => "table table-bordered", "border" => "2"],
|
||||
'baseUrl' => "/admin/user",
|
||||
'filters' => ['email'],
|
||||
]));
|
||||
'searchPrefix' => "",
|
||||
'searchParams' => $get,]));
|
||||
|
||||
$entityRelation = new \kernel\EntityRelation();
|
||||
$additionals = $entityRelation->getEntityRelationsBySlug("user");
|
||||
@ -37,7 +39,8 @@ foreach ($additionals as $additional) {
|
||||
$table->columns([
|
||||
'username' => [
|
||||
"filter" => [
|
||||
'class' => \Itguild\Tables\Filter\InputTextFilter::class
|
||||
'class' => \kernel\filters\BootstrapTextFilter::class,
|
||||
'value' => $get['username'] ?? null,
|
||||
]
|
||||
],
|
||||
'user_photo' => function ($data) {
|
||||
|
Reference in New Issue
Block a user