uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
admin.brosiper.codeskitter.site
/
app
/
Repositories
/
CustomRoleRepository.php
/
/
<?php namespace App\Repositories; use App\Contracts\Repositories\CustomRoleRepositoryInterface; use App\Models\AdminRole; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; class CustomRoleRepository implements CustomRoleRepositoryInterface { public function __construct(protected AdminRole $role) { } public function add(array $data): string|object { $role = $this->role->newInstance(); foreach ($data as $key => $column) { $role[$key] = $column; } $role->save(); return $role; } public function getFirstWhere(array $params, array $relations = []): ?Model { return $this->role->where($params)->first(); } public function getList(array $orderBy = [], array $relations = [], int|string $dataLimit = DEFAULT_DATA_LIMIT, int $offset = null): Collection|LengthAwarePaginator { return $this->role->whereNotIn('id', [1])->get(); } public function getListWhere(string $searchValue = null, array $filters = [], array $relations = [], int|string $dataLimit = DEFAULT_DATA_LIMIT, int $offset = null): Collection|LengthAwarePaginator { $key = explode(' ', $searchValue); return $this->role->whereNotIn('id',[1]) ->when(isset($searchValue), function($query) use($key) { $query->where(function ($q) use ($key) { foreach ($key as $value) { $q->orWhere('name', 'like', "%{$value}%"); } }); }) ->latest()->paginate($dataLimit); } public function update(string $id, array $data): bool|string|object { $role = $this->role->find($id); foreach ($data as $key => $column) { $role[$key] = $column; } $role->save(); return $role; } public function delete(string $id): bool { $role = $this->role->find($id); $role->translations()->delete(); $role->delete(); return true; } public function getSearchList(Request $request): Collection { $key = explode(' ', $request['search']); return $this->role->where('id','!=','1') ->where(function ($q) use ($key) { foreach ($key as $value) { $q->orWhere('name', 'like', "%{$value}%"); } })->latest()->limit(50)->get(); } public function getFirstWithoutGlobalScopeWhere(array $params, array $relations = []): ?Model { return $this->role->withoutGlobalScope('translate')->where($params)->first(['id','name','modules']); } }
/home/users/unlimited/www/admin.brosiper.codeskitter.site/app/Repositories/CustomRoleRepository.php