You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
+1
@@ -33,6 +33,7 @@ class TwoFactorAuthenticatedSessionController extends Controller
|
||||
*/
|
||||
public function store(TwoFactorLoginRequest $request): TwoFactorLoginResponse
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->challengedUser();
|
||||
|
||||
if ($code = $request->validRecoveryCode()) {
|
||||
|
||||
@@ -26,15 +26,15 @@ class CreateNewUser implements CreatesNewUsers
|
||||
/**
|
||||
* Validate and create a newly registered user.
|
||||
*/
|
||||
public function create(array $input)
|
||||
public function create(array $input): User
|
||||
{
|
||||
if (setting('disable_registration') ?: '0' === '1') {
|
||||
if ((setting('disable_registration') ?: '0') === '1') {
|
||||
throw ValidationException::withMessages([
|
||||
'registration' => __('Registration is disabled.'),
|
||||
]);
|
||||
}
|
||||
|
||||
$ip = request()?->ip();
|
||||
$ip = request()->ip();
|
||||
if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) {
|
||||
throw ValidationException::withMessages([
|
||||
'registration' => __('Your IP address seems to be invalid'),
|
||||
@@ -57,7 +57,7 @@ class CreateNewUser implements CreatesNewUsers
|
||||
$user = User::create([
|
||||
'username' => $input['username'],
|
||||
'mail' => $input['mail'],
|
||||
'password' => Hash::make($input['password']),
|
||||
'password' => Hash::make((string) $input['password']),
|
||||
'account_created' => time(),
|
||||
'last_login' => time(),
|
||||
'motto' => setting('start_motto') ?: 'Welcome to the hotel!',
|
||||
@@ -87,12 +87,12 @@ class CreateNewUser implements CreatesNewUsers
|
||||
->first();
|
||||
|
||||
if (is_null($referralUser)) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
return $user;
|
||||
}
|
||||
|
||||
// If same IP skip referral incrementation
|
||||
if ($referralUser->ip_current == $user->ip_current || $referralUser->ip_register == $user->ip_register) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
return $user;
|
||||
}
|
||||
|
||||
$referralUser->referrals()->updateOrCreate(['user_id' => $referralUser->id], [
|
||||
|
||||
@@ -10,14 +10,20 @@ use App\Services\User\UserApiService;
|
||||
|
||||
class HotelApiController extends Controller
|
||||
{
|
||||
public function __construct(private readonly UserApiService $userApiService): void {}
|
||||
public function __construct(private readonly UserApiService $userApiService) {}
|
||||
|
||||
/**
|
||||
* @param array<int, string> $columns
|
||||
*/
|
||||
public function fetchUser(string $username, array $columns = ['username', 'motto', 'look']): UserResource
|
||||
{
|
||||
return new UserResource($this->userApiService->fetchUser($username, $columns));
|
||||
}
|
||||
|
||||
public function onlineUsers($columns = ['username', 'motto', 'look'], bool $randomOrder = true): OnlineUsersResource
|
||||
/**
|
||||
* @param array<int, string> $columns
|
||||
*/
|
||||
public function onlineUsers(array $columns = ['username', 'motto', 'look'], bool $randomOrder = true): OnlineUsersResource
|
||||
{
|
||||
return new OnlineUsersResource($this->userApiService->onlineUsers($columns, $randomOrder));
|
||||
}
|
||||
|
||||
@@ -39,7 +39,10 @@ class ArticleController extends Controller
|
||||
|
||||
public function toggleReaction(WebsiteArticle $article, Request $request): JsonResponse
|
||||
{
|
||||
$response = $this->reactionService->toggleReaction($article, Auth::user(), $request);
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
$response = $this->reactionService->toggleReaction($article, $user, $request);
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class WebsiteArticleCommentsController extends Controller
|
||||
{
|
||||
public function __construct(public readonly CommentService $commentService): void {}
|
||||
public function __construct(public readonly CommentService $commentService) {}
|
||||
|
||||
public function store(WebsiteArticle $article, ArticleCommentFormRequest $request): RedirectResponse
|
||||
{
|
||||
$this->commentService->store($request->get('comment'), $article);
|
||||
$this->commentService->store($request->string('comment')->toString(), $article);
|
||||
|
||||
return back()->with('success', __('You comment has been posted!'));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class BadgeController extends Controller
|
||||
|
||||
public function show(SettingsService $settingsService): \Illuminate\Contracts\View\View
|
||||
{
|
||||
$cost = (int) $settingsService->getOrDefault('drawbadge_currency_value', 150);
|
||||
$cost = (int) $settingsService->getOrDefault('drawbadge_currency_value', '150');
|
||||
$currencyType = $settingsService->getOrDefault('drawbadge_currency_type', 'credits');
|
||||
$badgesPath = $settingsService->getOrDefault('badge_path_filesystem');
|
||||
|
||||
@@ -43,8 +43,14 @@ class BadgeController extends Controller
|
||||
|
||||
public function buy(Request $request, SendCurrency $sendCurrency, SettingsService $settingsService): \Illuminate\Http\JsonResponse
|
||||
{
|
||||
$user = Auth::user();
|
||||
$cost = (int) $settingsService->getOrDefault('drawbadge_currency_value', 150);
|
||||
/** @var \App\Models\User|null $user */
|
||||
$user = $request->user();
|
||||
|
||||
if (! $user) {
|
||||
return response()->json(['success' => false, 'message' => 'Unauthorized.'], 401);
|
||||
}
|
||||
|
||||
$cost = (int) $settingsService->getOrDefault('drawbadge_currency_value', '150');
|
||||
$currencyType = $settingsService->getOrDefault('drawbadge_currency_type', 'credits');
|
||||
|
||||
$currentAmount = match ($currencyType) {
|
||||
@@ -65,13 +71,13 @@ class BadgeController extends Controller
|
||||
return response()->json(['success' => false, 'message' => 'Failed to deduct ' . $currencyType . '.'], 500);
|
||||
}
|
||||
|
||||
$badgeData = $request->input('badge_data');
|
||||
if (! $badgeData) {
|
||||
$badgeData = $request->string('badge_data')->toString();
|
||||
if ($badgeData === '') {
|
||||
return response()->json(['success' => false, 'message' => 'No badge data provided.'], 400);
|
||||
}
|
||||
|
||||
$badgeData = preg_replace('#^data:image/\w+;base64,#i', '', (string) $badgeData);
|
||||
$decoded = base64_decode((string) $badgeData, true);
|
||||
$badgeData = (string) preg_replace('#^data:image/\w+;base64,#i', '', $badgeData);
|
||||
$decoded = base64_decode($badgeData, true);
|
||||
|
||||
if ($decoded === false) {
|
||||
return response()->json(['success' => false, 'message' => 'Invalid base64 data.'], 400);
|
||||
|
||||
@@ -10,12 +10,15 @@ class FlashController extends Controller
|
||||
{
|
||||
public function __invoke(): View
|
||||
{
|
||||
Auth::user()->update([
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
$user->update([
|
||||
'ip_current' => request()->ip(),
|
||||
]);
|
||||
|
||||
return view('client.flash', [
|
||||
'sso' => Auth::user()->ssoTicket(),
|
||||
'sso' => $user->ssoTicket(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,15 @@ class NitroController extends Controller
|
||||
{
|
||||
public function __invoke(): View
|
||||
{
|
||||
Auth::user()->update([
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
$user->update([
|
||||
'ip_current' => request()->ip(),
|
||||
]);
|
||||
|
||||
return view('client.nitro', [
|
||||
'sso' => Auth::user()->ssoTicket(),
|
||||
'sso' => $user->ssoTicket(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,10 @@ use Illuminate\View\View;
|
||||
|
||||
class LeaderboardController extends Controller
|
||||
{
|
||||
/** @var array<int, int> */
|
||||
protected array $staffIds = [];
|
||||
|
||||
public function __construct(private readonly StaffService $staffService): void
|
||||
public function __construct(private readonly StaffService $staffService)
|
||||
{
|
||||
$this->staffIds = $this->staffService->fetchEmployeeIds();
|
||||
}
|
||||
@@ -44,6 +45,9 @@ class LeaderboardController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, UserSetting>
|
||||
*/
|
||||
private function retrieveSettings(string $column): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return UserSetting::select('user_id', $column)
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\View\View;
|
||||
|
||||
class PhotosController extends Controller
|
||||
{
|
||||
public function __construct(private readonly CameraService $cameraService): void {}
|
||||
public function __construct(private readonly CameraService $cameraService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class StaffApplicationsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffApplicationService $staffApplicationService): void {}
|
||||
public function __construct(private readonly StaffApplicationService $staffApplicationService) {}
|
||||
|
||||
public function index(): View
|
||||
{
|
||||
@@ -29,7 +29,16 @@ class StaffApplicationsController extends Controller
|
||||
|
||||
public function store(WebsiteOpenPosition $position, StaffApplicationFormRequest $request): RedirectResponse
|
||||
{
|
||||
if ($this->staffApplicationService->hasUserAppliedForPosition($request->user(), $position->permission->id)) {
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
if ($position->permission === null) {
|
||||
return back()->withErrors([
|
||||
'message' => __('Invalid position configuration.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->staffApplicationService->hasUserAppliedForPosition($user, $position->permission->id)) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You have already applied for this position.'),
|
||||
]);
|
||||
@@ -41,7 +50,7 @@ class StaffApplicationsController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$this->staffApplicationService->storeApplication($request->user(), $position->permission->id, $request->input('content'));
|
||||
$this->staffApplicationService->storeApplication($user, $position->permission->id, $request->string('content')->toString());
|
||||
|
||||
return to_route('staff-applications.index')->with('success', __('Your application has been submitted!'));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\View\View;
|
||||
|
||||
class StaffController extends Controller
|
||||
{
|
||||
public function __construct(private readonly StaffService $staffService): void {}
|
||||
public function __construct(private readonly StaffService $staffService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\View\View;
|
||||
|
||||
class WebsiteTeamsController extends Controller
|
||||
{
|
||||
public function __construct(private readonly TeamService $teamService): void {}
|
||||
public function __construct(private readonly TeamService $teamService) {}
|
||||
|
||||
public function __invoke(): View
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Illuminate\View\View;
|
||||
|
||||
class WebsiteRareValuesController extends Controller
|
||||
{
|
||||
public function __construct(private readonly RareValueCategoriesService $valueCategoriesService): void {}
|
||||
public function __construct(private readonly RareValueCategoriesService $valueCategoriesService) {}
|
||||
|
||||
public function index(): View
|
||||
{
|
||||
@@ -42,7 +42,7 @@ class WebsiteRareValuesController extends Controller
|
||||
|
||||
public function search(RareSearchFormRequest $request): View|RedirectResponse
|
||||
{
|
||||
$searchTerm = $request->input('search');
|
||||
$searchTerm = $request->string('search')->toString();
|
||||
|
||||
$categories = $this->valueCategoriesService->searchCategories($searchTerm);
|
||||
|
||||
@@ -64,13 +64,18 @@ class WebsiteRareValuesController extends Controller
|
||||
->where('item_id', $value->item_id)
|
||||
->get();
|
||||
|
||||
$itemsPerUser = $items->groupBy('user_id')->map(fn ($group) => [
|
||||
'user' => $group->first()->user,
|
||||
'item_count' => $group->count(),
|
||||
]);
|
||||
$itemsPerUser = $items->groupBy('user_id')->map(function ($group) {
|
||||
/** @var \App\Models\Game\Furniture\Item $firstItem */
|
||||
$firstItem = $group->first();
|
||||
|
||||
return [
|
||||
'user' => $firstItem->user,
|
||||
'item_count' => $group->count(),
|
||||
];
|
||||
});
|
||||
|
||||
if ((bool) setting('enable_caching')) {
|
||||
Cache::remember('allItems_' . $value->id, setting('cache_timer'), fn () => $items);
|
||||
Cache::remember('allItems_' . $value->id, (int) setting('cache_timer'), fn () => $items);
|
||||
}
|
||||
|
||||
return view('value', [
|
||||
|
||||
@@ -35,7 +35,9 @@ class TicketController extends Controller
|
||||
|
||||
public function store(WebsiteTicketFormRequest $request): RedirectResponse
|
||||
{
|
||||
Auth::user()->tickets()->create($request->validated());
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
$user->tickets()->create($request->validated());
|
||||
|
||||
return back()->with('success', __('Ticket submitted!'));
|
||||
}
|
||||
|
||||
@@ -24,9 +24,12 @@ class TicketReplyController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
$data = $request->validated();
|
||||
$ticket->replies()->create([
|
||||
'user_id' => $request->user()->id,
|
||||
'user_id' => $user->id,
|
||||
'content' => $data['content'],
|
||||
]);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class InstallationController extends Controller
|
||||
'installation_key' => ['required', 'string', 'max:255', new ValidateInstallationKeyRule],
|
||||
]);
|
||||
|
||||
WebsiteInstallation::first()->update([
|
||||
WebsiteInstallation::first()?->update([
|
||||
'step' => 1,
|
||||
'user_ip' => $request->ip(),
|
||||
]);
|
||||
@@ -38,7 +38,10 @@ class InstallationController extends Controller
|
||||
{
|
||||
$settings = $this->getSettingsForStep($currentStep);
|
||||
|
||||
return view('installation.step-' . $currentStep, [
|
||||
/** @var view-string $view */
|
||||
$view = 'installation.step-' . (string) $currentStep;
|
||||
|
||||
return view($view, [
|
||||
'settings' => $settings,
|
||||
]);
|
||||
}
|
||||
@@ -47,21 +50,27 @@ class InstallationController extends Controller
|
||||
{
|
||||
$this->updateSettings($request);
|
||||
|
||||
WebsiteInstallation::increment('step');
|
||||
WebsiteInstallation::query()->increment('step');
|
||||
|
||||
/** @var \App\Models\Miscellaneous\WebsiteInstallation|null $installation */
|
||||
$installation = WebsiteInstallation::first();
|
||||
|
||||
return to_route('installation.show-step', WebsiteInstallation::first()->step);
|
||||
return to_route('installation.show-step', $installation->step ?? 1);
|
||||
}
|
||||
|
||||
public function previousStep(): RedirectResponse
|
||||
{
|
||||
WebsiteInstallation::decrement('step');
|
||||
WebsiteInstallation::query()->decrement('step');
|
||||
|
||||
return to_route('installation.show-step', WebsiteInstallation::first()->step);
|
||||
/** @var \App\Models\Miscellaneous\WebsiteInstallation|null $installation */
|
||||
$installation = WebsiteInstallation::first();
|
||||
|
||||
return to_route('installation.show-step', $installation->step ?? 1);
|
||||
}
|
||||
|
||||
public function restartInstallation(): RedirectResponse
|
||||
{
|
||||
WebsiteInstallation::first()->update([
|
||||
WebsiteInstallation::first()?->update([
|
||||
'step' => 0,
|
||||
'installation_key' => Str::uuid(),
|
||||
'user_ip' => null,
|
||||
@@ -76,7 +85,7 @@ class InstallationController extends Controller
|
||||
|
||||
public function completeInstallation(): RedirectResponse
|
||||
{
|
||||
WebsiteInstallation::latest()->first()->update([
|
||||
WebsiteInstallation::latest()->first()?->update([
|
||||
'completed' => true,
|
||||
]);
|
||||
|
||||
@@ -100,10 +109,20 @@ class InstallationController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, \App\Models\Miscellaneous\WebsiteSetting>
|
||||
*/
|
||||
private function getSettingsForStep(int $step): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
$settingsData = array_chunk(WebsiteSetting::all()->pluck('key')->toArray(), ceil(WebsiteSetting::count() / 4));
|
||||
$count = WebsiteSetting::count();
|
||||
/** @var int<1, max> $chunkSize */
|
||||
$chunkSize = $count > 0 ? (int) ceil($count / 4) : 1;
|
||||
|
||||
/** @var array<int, string> $keys */
|
||||
$keys = WebsiteSetting::query()->pluck('key')->toArray();
|
||||
$settingsData = array_chunk($keys, $chunkSize);
|
||||
|
||||
/** @var array<int, string> $settings */
|
||||
$settings = match ($step) {
|
||||
1 => $settingsData[0] ?? [],
|
||||
2 => $settingsData[1] ?? [],
|
||||
|
||||
@@ -33,9 +33,11 @@ class LogoGeneratorController extends Controller
|
||||
|
||||
$setting = WebsiteSetting::where('key', 'cms_logo')->first();
|
||||
|
||||
$setting->update([
|
||||
'value' => sprintf('%s/%s', $path, $filename),
|
||||
]);
|
||||
if ($setting) {
|
||||
$setting->update([
|
||||
'value' => sprintf('%s/%s', $path, $filename),
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json(['success' => true, 'message' => 'Logo updated!']);
|
||||
}
|
||||
|
||||
@@ -16,10 +16,12 @@ class PaypalController extends Controller
|
||||
|
||||
private const string STATUS_COMPLETED = 'COMPLETED';
|
||||
|
||||
public function __construct(private PayPalClient $provider): void
|
||||
public function __construct(private PayPalClient $provider)
|
||||
{
|
||||
$this->provider = new PayPalClient;
|
||||
$this->provider->setApiCredentials(config('habbo.paypal'));
|
||||
/** @var array<mixed> $config */
|
||||
$config = config('habbo.paypal');
|
||||
$this->provider->setApiCredentials($config);
|
||||
$this->provider->getAccessToken();
|
||||
}
|
||||
|
||||
@@ -46,6 +48,7 @@ class PaypalController extends Controller
|
||||
],
|
||||
];
|
||||
|
||||
/** @var array<string, mixed> $response */
|
||||
$response = $this->provider->createOrder($orderData);
|
||||
|
||||
if (isset($response['id']) === false) {
|
||||
@@ -56,14 +59,19 @@ class PaypalController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($response['links'] as $links) {
|
||||
if ($links['rel'] === 'approve') {
|
||||
$request->user()->transactions()->create([
|
||||
/** @var array<int, array<string, string>> $links */
|
||||
$links = $response['links'];
|
||||
|
||||
foreach ($links as $link) {
|
||||
if ($link['rel'] === 'approve') {
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
$user->transactions()->create([
|
||||
'transaction_id' => $response['id'],
|
||||
'amount' => 0,
|
||||
]);
|
||||
|
||||
return redirect()->away($links['href']);
|
||||
return redirect()->away($link['href']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +86,7 @@ class PaypalController extends Controller
|
||||
'token' => ['required'],
|
||||
]);
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
$transaction = $user->transactions()->where('transaction_id', $request['token'])->first();
|
||||
@@ -85,41 +94,71 @@ class PaypalController extends Controller
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please try again later')]);
|
||||
}
|
||||
|
||||
$response = $this->provider->capturePaymentOrder($request['token']);
|
||||
$paymentDetails = $response['purchase_units'][0]['payments']['captures'][0];
|
||||
/** @var array<string, mixed> $response */
|
||||
$response = $this->provider->capturePaymentOrder($request->string('token')->toString());
|
||||
|
||||
if (isset($response['error'])) {
|
||||
/** @var array<string, mixed> $error */
|
||||
$error = $response['error'];
|
||||
/** @var array<int, array<string, string>> $details */
|
||||
$details = $error['details'] ?? [];
|
||||
$issue = $details[0]['issue'] ?? 'Unknown';
|
||||
$description = $details[0]['description'] ?? 'Unknown';
|
||||
|
||||
$transaction->update([
|
||||
'status' => $response['name'] ?? 'ERROR',
|
||||
'description' => sprintf('%s - %s', $issue, $description),
|
||||
'amount' => 0,
|
||||
]);
|
||||
|
||||
if (! isset($response['status'], $paymentDetails)) {
|
||||
Log::error('Invalid response from PayPal', ['response' => $response]);
|
||||
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please try again later')]);
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please check your paypal account to make sure nothing was deducted and try again')]);
|
||||
}
|
||||
|
||||
if (($response['status'] ?? null) === null) {
|
||||
$details = $response['error']['details'][0];
|
||||
$transaction->update([
|
||||
'status' => $response['name'],
|
||||
'description' => sprintf('%s - %s', $details['issue'], $details['description']),
|
||||
'amount' => 0,
|
||||
]);
|
||||
/** @var array<int, mixed> $purchaseUnits */
|
||||
$purchaseUnits = $response['purchase_units'] ?? [];
|
||||
/** @var array<string, mixed> $unit */
|
||||
$unit = $purchaseUnits[0] ?? [];
|
||||
/** @var array<string, mixed> $payments */
|
||||
$payments = $unit['payments'] ?? [];
|
||||
/** @var array<int, mixed> $captures */
|
||||
$captures = $payments['captures'] ?? [];
|
||||
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please check your paypal account to make sure nothing was deducted and try again')]);
|
||||
if (! isset($captures[0])) {
|
||||
Log::error('Invalid response from PayPal', ['response' => $response]);
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please try again later')]);
|
||||
}
|
||||
|
||||
/** @var array<string, mixed> $paymentDetails */
|
||||
$paymentDetails = $captures[0];
|
||||
|
||||
/** @var array<string, mixed> $amountDetails */
|
||||
$amountDetails = $paymentDetails['amount'] ?? [];
|
||||
|
||||
$paymentDetails = $response['purchase_units'][0]['payments']['captures'][0];
|
||||
if (! isset($response['status'])) {
|
||||
Log::error('Invalid response from PayPal', ['response' => $response]);
|
||||
|
||||
return to_route('shop.index')->withErrors(['message' => __('Something went wrong, please try again later')]);
|
||||
}
|
||||
|
||||
$status = $response['status'];
|
||||
|
||||
$transaction->update([
|
||||
'status' => $paymentDetails['status'],
|
||||
'amount' => $paymentDetails['amount']['value'],
|
||||
'currency' => $paymentDetails['amount']['currency_code'],
|
||||
'amount' => $amountDetails['value'] ?? 0,
|
||||
'currency' => $amountDetails['currency_code'] ?? 'USD',
|
||||
]);
|
||||
|
||||
if ($response['status'] !== self::STATUS_COMPLETED) {
|
||||
if ($status !== self::STATUS_COMPLETED) {
|
||||
return to_route('shop.index')->withErrors(
|
||||
['message' => $response['message'] ?? __('Something went wrong')],
|
||||
);
|
||||
}
|
||||
|
||||
$user->increment('website_balance', $paymentDetails['amount']['value']);
|
||||
$value = $amountDetails['value'] ?? 0;
|
||||
if (! is_numeric($value)) {
|
||||
$value = 0;
|
||||
}
|
||||
$user->increment('website_balance', (int) $value);
|
||||
|
||||
return to_route('shop.index')->with('success', __('Transaction successful'));
|
||||
}
|
||||
@@ -130,7 +169,10 @@ class PaypalController extends Controller
|
||||
'token' => ['required'],
|
||||
]);
|
||||
|
||||
$transaction = $request->user()->transactions()->where('transaction_id', $request['token'])->first();
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
$transaction = $user->transactions()->where('transaction_id', $request['token'])->first();
|
||||
if ($transaction !== null) {
|
||||
$transaction->update([
|
||||
'status' => self::STATUS_CANCELLED,
|
||||
|
||||
@@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ShopController extends Controller
|
||||
{
|
||||
public function __construct(private readonly RconService $rconService): void {}
|
||||
public function __construct(private readonly RconService $rconService) {}
|
||||
|
||||
public function __invoke(?WebsiteShopCategory $category): \Illuminate\Contracts\View\View
|
||||
{
|
||||
@@ -56,7 +56,9 @@ class ShopController extends Controller
|
||||
|
||||
public function purchase(WebsiteShopArticle $package, Request $request, SendCurrency $sendCurrency): Response
|
||||
{
|
||||
$user = Auth::user();
|
||||
/** @var \App\Models\User $currentUser */
|
||||
$currentUser = Auth::user();
|
||||
$user = $currentUser;
|
||||
|
||||
if ($request->has('receiver')) {
|
||||
if (! $package->is_giftable) {
|
||||
@@ -72,13 +74,12 @@ class ShopController extends Controller
|
||||
['message' => __('Recipient not found')],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($package->give_rank && $user->rank >= $package->give_rank) {
|
||||
$message = __('You are already this or a higher rank');
|
||||
|
||||
if ($user->username !== Auth::user()->username) {
|
||||
if ($user->username !== $currentUser->username) {
|
||||
$message = __('The recipient is already this or a higher rank');
|
||||
}
|
||||
|
||||
@@ -87,27 +88,27 @@ class ShopController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
if (! $this->rconService->isConnected && $user->online === '1') {
|
||||
if (! $this->rconService->isConnected && $user->online) {
|
||||
return to_route('shop.index')->withErrors(
|
||||
['message' => __('Please logout before purchasing a package')],
|
||||
);
|
||||
}
|
||||
|
||||
if (Auth::user()->website_balance < $package->price()) {
|
||||
if ($currentUser->website_balance < $package->price()) {
|
||||
return to_route('shop.index')->withErrors(
|
||||
['message' => __('You need to top-up your account with another $:amount to purchase this package', ['amount' => ($package->price() - Auth::user()->website_balance)])],
|
||||
['message' => __('You need to top-up your account with another $:amount to purchase this package', ['amount' => ($package->price() - $currentUser->website_balance)])],
|
||||
);
|
||||
}
|
||||
|
||||
Auth::user()?->decrement('website_balance', $package->price());
|
||||
$currentUser->decrement('website_balance', $package->price());
|
||||
|
||||
$sendCurrency->execute($user, 'credits', $package->credits);
|
||||
$sendCurrency->execute($user, 'duckets', $package->duckets);
|
||||
$sendCurrency->execute($user, 'diamonds', $package->diamonds);
|
||||
$sendCurrency->execute($user, 'credits', (int) $package->credits);
|
||||
$sendCurrency->execute($user, 'duckets', (int) $package->duckets);
|
||||
$sendCurrency->execute($user, 'diamonds', (int) $package->diamonds);
|
||||
|
||||
if ($package->give_rank) {
|
||||
if ($this->rconService->isConnected) {
|
||||
$this->rconService->setRank($user, $package->give_rank);
|
||||
$this->rconService->setRank($user, (int) $package->give_rank);
|
||||
$this->rconService->disconnectUser($user);
|
||||
} else {
|
||||
$user->update([
|
||||
@@ -121,22 +122,28 @@ class ShopController extends Controller
|
||||
}
|
||||
|
||||
if ($package->furniture) {
|
||||
$this->handleFurniture(json_decode($package->furniture, true));
|
||||
$furniture = json_decode($package->furniture, true);
|
||||
if (is_array($furniture)) {
|
||||
$this->handleFurniture($user, $furniture);
|
||||
}
|
||||
}
|
||||
|
||||
$message = __('You have successfully purchased the package :name', ['name' => $package->name]);
|
||||
|
||||
if ($user->username !== Auth::user()->username) {
|
||||
if ($user->username !== $currentUser->username) {
|
||||
$message = __('You have successfully purchased the package :name for :username', ['name' => $package->name, 'username' => $user->username]);
|
||||
}
|
||||
|
||||
return to_route('shop.index')->with('success', $message);
|
||||
}
|
||||
|
||||
public function handleFurniture(array $furniture)
|
||||
/**
|
||||
* @param array<mixed> $furniture
|
||||
*/
|
||||
public function handleFurniture(User $user, array $furniture): void
|
||||
{
|
||||
$sendFurniture = app(SendFurniture::class);
|
||||
|
||||
$sendFurniture->execute(Auth::user(), $furniture);
|
||||
$sendFurniture->execute($user, $furniture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,9 @@ class ShopVoucherController extends Controller
|
||||
{
|
||||
public function __invoke(ShopVoucherFormRequest $request): RedirectResponse
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
$voucher = WebsiteShopVoucher::where('code', $request->string('code'))->first();
|
||||
$voucher = WebsiteShopVoucher::where('code', $request->string('code')->toString())->first();
|
||||
|
||||
if (is_null($voucher) || ($voucher->expires_at && $voucher->expires_at->lte(now()))) {
|
||||
return back()->withErrors([
|
||||
|
||||
@@ -18,12 +18,15 @@ class AccountSettingsController extends Controller
|
||||
private readonly SessionService $sessionService,
|
||||
private readonly UserService $userService,
|
||||
private readonly RconService $rconService
|
||||
): void {}
|
||||
) {}
|
||||
|
||||
public function edit(): View
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
return view('user.settings.account', [
|
||||
'user' => Auth::user()->load('settings:allow_name_change'),
|
||||
'user' => $user->load('settings:allow_name_change'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -46,7 +49,7 @@ class AccountSettingsController extends Controller
|
||||
|
||||
// $allowedNameChange = $user->settings?->allow_name_change && $user->username !== $request->input('username');
|
||||
|
||||
if (! $this->rconService->isConnected() && Auth::user()->online === '1') {
|
||||
if (! $this->rconService->isConnected() && $user->online) {
|
||||
return back()->withErrors('You must be offline to change your account settings');
|
||||
}
|
||||
|
||||
@@ -55,12 +58,12 @@ class AccountSettingsController extends Controller
|
||||
$this->userService->updateField($user, 'username', $request->input('username'));
|
||||
} **/
|
||||
if ($user->mail !== $request->input('mail')) {
|
||||
$this->userService->updateField($user, 'mail', $request->input('mail'));
|
||||
$this->userService->updateField($user, 'mail', $request->string('mail')->toString());
|
||||
}
|
||||
|
||||
if ($user->motto !== $request->input('motto')) {
|
||||
$this->rconService->setMotto($user, $request->input('motto'));
|
||||
$this->userService->updateField($user, 'motto', $request->input('motto'));
|
||||
$this->rconService->setMotto($user, $request->string('motto')->toString());
|
||||
$this->userService->updateField($user, 'motto', $request->string('motto')->toString());
|
||||
}
|
||||
|
||||
return to_route('settings.account.show')->with('success', __('Your account settings has been updated'));
|
||||
|
||||
@@ -16,8 +16,11 @@ class BannedController extends Controller
|
||||
->orderByDesc('id')
|
||||
->first();
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
return view('banned', [
|
||||
'ban' => $ipBan ?? Auth::user()->ban,
|
||||
'ban' => $ipBan ?? $user->ban,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ class ForgotPasswordController extends Controller
|
||||
'token' => $token,
|
||||
]);
|
||||
|
||||
Mail::send('email.forgetPassword', ['token' => $token], function ($message) use ($request): void {
|
||||
$message->to($request->mail);
|
||||
Mail::send('email.forgetPassword', ['token' => $token], function (\Illuminate\Mail\Message $message) use ($request): void {
|
||||
$message->to($request->string('mail')->toString());
|
||||
$message->subject('Reset Password');
|
||||
});
|
||||
}
|
||||
@@ -47,7 +47,12 @@ class ForgotPasswordController extends Controller
|
||||
if ($prt === null) {
|
||||
return to_route('forgot.password.get')->withErrors('message', __('This token has expired!'));
|
||||
}
|
||||
$tokenExpiration = \Illuminate\Support\Facades\Date::now()->subMinutes(config('habbo.password_reset_token_time'));
|
||||
$resetTime = config('habbo.password_reset_token_time');
|
||||
if (! is_numeric($resetTime)) {
|
||||
$resetTime = 60;
|
||||
}
|
||||
|
||||
$tokenExpiration = \Illuminate\Support\Facades\Date::now()->subMinutes((int) $resetTime);
|
||||
if ($prt->created_at->gte($tokenExpiration)) {
|
||||
$prt->delete();
|
||||
|
||||
@@ -66,12 +71,14 @@ class ForgotPasswordController extends Controller
|
||||
'password_confirmation' => ['required'],
|
||||
]);
|
||||
|
||||
$prt = PasswordResetToken::select('email', 'token')->where('token', $token)->first();
|
||||
if ($prt === null) {
|
||||
$prt = PasswordResetToken::with('user')->select('email', 'token')->where('token', $token)->first();
|
||||
if ($prt === null || $prt->user === null) {
|
||||
return to_route('forgot.password.get')->withErrors('message', __('This token has expired!'));
|
||||
}
|
||||
|
||||
$prt->user->changePassword($request->password);
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $prt->user;
|
||||
$user->changePassword($request->string('password')->toString());
|
||||
$prt->delete();
|
||||
|
||||
return to_route('login')->with('success', __('Your password has been successfully reset!'));
|
||||
|
||||
@@ -28,7 +28,16 @@ class GuestbookController extends Controller
|
||||
|
||||
public function destroy(User $user, WebsiteUserGuestbook $guestbook): RedirectResponse
|
||||
{
|
||||
if ($guestbook->user_id !== Auth::id() && $guestbook->profile_id !== $user->id && Auth::user()->rank < (int) setting('min_staff_rank')) {
|
||||
/** @var \App\Models\User|null $currentUser */
|
||||
$currentUser = Auth::user();
|
||||
|
||||
if ($currentUser === null) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You must be logged in.'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($guestbook->user_id !== $currentUser->id && $guestbook->profile_id !== $user->id && $currentUser->rank < (int) setting('min_staff_rank')) {
|
||||
return back()->withErrors([
|
||||
'message' => __('Do do not have permission to delete this message'),
|
||||
]);
|
||||
@@ -41,12 +50,19 @@ class GuestbookController extends Controller
|
||||
|
||||
private function validateGuestbookPost(User $user, GuestbookFormRequest $request): ?RedirectResponse
|
||||
{
|
||||
if ($user->id === $request->user()->id) {
|
||||
/** @var \App\Models\User|null $currentUser */
|
||||
$currentUser = $request->user();
|
||||
|
||||
if ($currentUser === null) {
|
||||
return $this->redirectWithError(__('You must be logged in.'));
|
||||
}
|
||||
|
||||
if ($user->id === $currentUser->id) {
|
||||
return $this->redirectWithError(__('You cannot post a message on your own profile.'));
|
||||
}
|
||||
|
||||
$maxAllowedPostCount = in_array(setting('max_guestbook_posts_per_profile'), ['', '0'], true) ? 3 : (int) setting('max_guestbook_posts_per_profile');
|
||||
if ($user->profileGuestbook()->where('user_id', $request->user()->id)->count() >= $maxAllowedPostCount) {
|
||||
$maxAllowedPostCount = in_array((string) setting('max_guestbook_posts_per_profile'), ['', '0'], true) ? 3 : (int) setting('max_guestbook_posts_per_profile');
|
||||
if ($user->profileGuestbook()->where('user_id', $currentUser->id)->count() >= $maxAllowedPostCount) {
|
||||
return $this->redirectWithError(__('You have already posted :count messages on this profile.', ['count' => $maxAllowedPostCount]));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,12 @@ class MeController extends Controller
|
||||
{
|
||||
public function __invoke(): View
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
return view('user.me', [
|
||||
'onlineFriends' => Auth::user()?->getOnlineFriends(),
|
||||
'user' => Auth::user()?->load('permission:id,rank_name'),
|
||||
'onlineFriends' => $user->getOnlineFriends(),
|
||||
'user' => $user->load('permission:id,rank_name'),
|
||||
'articles' => WebsiteArticle::whereHas('user')->with('user:id,username,look')->latest()->take(5)->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,11 @@ class PasswordSettingsController extends Controller
|
||||
|
||||
public function update(PasswordSettingsFormRequest $request): RedirectResponse
|
||||
{
|
||||
Auth::user()->update([
|
||||
'password' => Hash::make($request->input('password')),
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
$user->update([
|
||||
'password' => Hash::make($request->string('password')->toString()),
|
||||
]);
|
||||
|
||||
return to_route('settings.password.show')->with('success', __('Your password has been changed!'));
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Models\Game\Player\MessengerFriendship;
|
||||
use App\Models\User;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
@@ -30,12 +31,12 @@ class ProfileController extends Controller
|
||||
private function loadUserRelations(User $user): User
|
||||
{
|
||||
return $user->load([
|
||||
'badges' => function ($badges): void {
|
||||
'badges' => function (HasMany $badges): void {
|
||||
$badges->where('slot_id', '>', '0')
|
||||
->orderBy('slot_id')
|
||||
->take(5);
|
||||
},
|
||||
'rooms' => function ($rooms): void {
|
||||
'rooms' => function (HasMany $rooms): void {
|
||||
$rooms->select('id', 'owner_id', 'name', 'users')
|
||||
->orderByDesc('users')
|
||||
->orderBy('id');
|
||||
@@ -43,6 +44,9 @@ class ProfileController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, MessengerFriendship>
|
||||
*/
|
||||
private function getUserFriends(int $userId): Collection
|
||||
{
|
||||
return MessengerFriendship::select('user_two_id')
|
||||
@@ -54,6 +58,9 @@ class ProfileController extends Controller
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, GuildMember>
|
||||
*/
|
||||
private function getUserGroups(int $userId): Collection
|
||||
{
|
||||
return GuildMember::query()
|
||||
|
||||
@@ -11,17 +11,22 @@ class ReferralController extends Controller
|
||||
{
|
||||
public function __invoke(RconService $rcon): RedirectResponse
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
if (! $user->referrals || $user->referrals->referrals_total < setting('referrals_needed')) {
|
||||
|
||||
/** @var \App\Models\User\UserReferral|null $referrals */
|
||||
$referrals = $user->referrals;
|
||||
|
||||
if ($referrals === null || $referrals->referrals_total < (int) setting('referrals_needed')) {
|
||||
return back()->withErrors([
|
||||
'message' => __('You do not have enough referrals to claim your reward'),
|
||||
]);
|
||||
}
|
||||
|
||||
// Decrease the total amount of referrals with the amount needed to claim reward
|
||||
$user->referrals->decrement('referrals_total', setting('referrals_needed'));
|
||||
$referrals->decrement('referrals_total', (int) setting('referrals_needed'));
|
||||
|
||||
$rcon->giveDiamonds($user, setting('referral_reward_amount'));
|
||||
$rcon->giveDiamonds($user, (int) setting('referral_reward_amount'));
|
||||
|
||||
// Log the claim
|
||||
$user->claimedReferralLog()->create([
|
||||
|
||||
@@ -25,7 +25,10 @@ class TwoFactorAuthenticationController extends Controller
|
||||
|
||||
public function verify(Request $request): RedirectResponse
|
||||
{
|
||||
$confirmed = $request->user()->confirmTwoFactorAuthentication($request->input('code'));
|
||||
/** @var \App\Models\User $user */
|
||||
$user = $request->user();
|
||||
|
||||
$confirmed = $user->confirmTwoFactorAuthentication($request->string('code')->toString());
|
||||
if (! $confirmed) {
|
||||
return back()->withErrors('Invalid Two Factor Authentication code');
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace App\Models\Community\Staff;
|
||||
use App\Models\Game\Permission;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class WebsiteOpenPosition extends Model
|
||||
{
|
||||
@@ -12,7 +14,7 @@ class WebsiteOpenPosition extends Model
|
||||
|
||||
protected $table = 'website_open_positions';
|
||||
|
||||
use HasFactory;
|
||||
// use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'permission_id',
|
||||
@@ -25,21 +27,31 @@ class WebsiteOpenPosition extends Model
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
static::deleting(function ($openPosition): void {
|
||||
static::deleting(function (WebsiteOpenPosition $openPosition): void {
|
||||
WebsiteStaffApplications::where('rank_id', $openPosition->permission_id)->delete();
|
||||
});
|
||||
}
|
||||
|
||||
public function permission()
|
||||
/**
|
||||
* @return BelongsTo<Permission, $this>
|
||||
*/
|
||||
public function permission(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Permission::class, 'permission_id', 'id');
|
||||
}
|
||||
|
||||
public function applications()
|
||||
/**
|
||||
* @return HasMany<WebsiteStaffApplications, $this>
|
||||
*/
|
||||
public function applications(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteStaffApplications::class, 'rank_id', 'permission_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder<WebsiteOpenPosition> $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder<WebsiteOpenPosition>
|
||||
*/
|
||||
#[\Illuminate\Database\Eloquent\Attributes\Scope]
|
||||
protected function canApply($query)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,14 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property string $id
|
||||
* @property int|null $user_id
|
||||
* @property string|null $ip_address
|
||||
* @property string|null $user_agent
|
||||
* @property string $payload
|
||||
* @property int $last_activity
|
||||
*/
|
||||
class Session extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
@@ -8,6 +8,13 @@ class WebsiteShopVoucher extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'expires_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -66,6 +66,7 @@ use Spatie\Activitylog\Traits\LogsActivity;
|
||||
* @property \Illuminate\Support\Carbon|null $two_factor_confirmed_at
|
||||
* @property string|null $remember_token
|
||||
* @property \Illuminate\Support\Carbon|null $email_verified_at
|
||||
* @property int $website_balance
|
||||
*/
|
||||
class User extends Authenticatable implements FilamentUser, HasName
|
||||
{
|
||||
@@ -260,23 +261,32 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, MessengerFriendship>
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, \App\Models\Game\Player\MessengerFriendship>
|
||||
*/
|
||||
public function getOnlineFriends(int $total = 10): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return $this->friends()
|
||||
/** @var \Illuminate\Database\Eloquent\Collection<int, \App\Models\Game\Player\MessengerFriendship> $friends */
|
||||
$friends = $this->friends()
|
||||
->select(['user_two_id', 'users.id', 'users.username', 'users.look', 'users.motto', 'users.last_online'])
|
||||
->join('users', 'users.id', '=', 'user_two_id')
|
||||
->where('users.online', '1')
|
||||
->inRandomOrder()
|
||||
->limit($total)
|
||||
->get();
|
||||
|
||||
return $friends;
|
||||
}
|
||||
|
||||
public function confirmTwoFactorAuthentication(string $code): void
|
||||
public function confirmTwoFactorAuthentication(string $code): bool
|
||||
{
|
||||
$secret = $this->two_factor_secret;
|
||||
|
||||
if (! is_string($secret)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$codeIsValid = app(TwoFactorAuthenticationProvider::class)
|
||||
->verify(decrypt($this->two_factor_secret), $code);
|
||||
->verify(decrypt($secret), $code);
|
||||
|
||||
if (! $codeIsValid) {
|
||||
return false;
|
||||
@@ -289,12 +299,12 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
return true;
|
||||
}
|
||||
|
||||
public function hasAppliedForPosition(int $rankId)
|
||||
public function hasAppliedForPosition(int $rankId): bool
|
||||
{
|
||||
return $this->applications()->where('rank_id', '=', $rankId)->exists();
|
||||
}
|
||||
|
||||
public function changePassword(string $newPassword)
|
||||
public function changePassword(string $newPassword): void
|
||||
{
|
||||
$this->password = Hash::make($newPassword);
|
||||
$this->save();
|
||||
@@ -307,7 +317,7 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return hasHousekeepingPermission('can_access_housekeeping');
|
||||
return (bool) hasHousekeepingPermission('can_access_housekeeping');
|
||||
}
|
||||
|
||||
public function getActivitylogOptions(): LogOptions
|
||||
|
||||
@@ -16,11 +16,17 @@ class Ban extends Model
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function staff(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_staff_id');
|
||||
|
||||
@@ -10,6 +10,9 @@ class ClaimedReferralLog extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
|
||||
@@ -6,10 +6,20 @@ use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $referrals_total
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
*/
|
||||
class UserReferral extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
|
||||
@@ -10,11 +10,17 @@ class WebsiteUserGuestbook extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function profile(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'profile_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
|
||||
@@ -4,35 +4,41 @@ namespace App\Models;
|
||||
|
||||
use App\Services\SettingsService;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
* @property string $image
|
||||
*/
|
||||
class WebsiteAd extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'image',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Casts\Attribute<string, never>
|
||||
*/
|
||||
protected function imageUrl(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
{
|
||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: function () {
|
||||
$settingsService = app(SettingsService::class);
|
||||
|
||||
/** @var string $adsPicturePath */
|
||||
$adsPicturePath = Cache::remember('ads_picture_path', 3600, fn () => $settingsService->getOrDefault('ads_picture_path'));
|
||||
if (! str_starts_with((string) $adsPicturePath, 'http')) {
|
||||
$adsPicturePath = rtrim((string) config('app.url'), '/') . '/' . ltrim((string) $adsPicturePath, '/');
|
||||
|
||||
if (! str_starts_with($adsPicturePath, 'http')) {
|
||||
$adsPicturePath = rtrim((string) config('app.url'), '/') . '/' . ltrim($adsPicturePath, '/');
|
||||
}
|
||||
return rtrim((string) $adsPicturePath, '/') . '/' . $this->image;
|
||||
return rtrim($adsPicturePath, '/') . '/' . $this->image;
|
||||
});
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
protected static function booted()
|
||||
{
|
||||
static::deleting(function ($websiteAd): void {
|
||||
static::deleting(function (WebsiteAd $websiteAd): void {
|
||||
try {
|
||||
$websiteAd->configureAdsDisk();
|
||||
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WebsiteBadge extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'badge_key',
|
||||
'badge_name',
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class WebsiteDrawBadge extends Model
|
||||
{
|
||||
@@ -10,7 +11,10 @@ class WebsiteDrawBadge extends Model
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function user()
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
|
||||
class Wordfilter extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use LogsActivity;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
@@ -38,11 +38,21 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
{
|
||||
Fortify::createUsersUsing(CreateNewUser::class);
|
||||
|
||||
RateLimiter::for('login', fn (Request $request) => Limit::perMinute(5)->by($request->input('username') . $request->ip()));
|
||||
RateLimiter::for('login', function (Request $request) {
|
||||
$username = $request->input('username');
|
||||
$ip = $request->ip();
|
||||
|
||||
RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(5)->by($request->session()->get('login.id')));
|
||||
return Limit::perMinute(5)->by((is_string($username) ? $username : '') . (is_string($ip) ? $ip : ''));
|
||||
});
|
||||
|
||||
Fortify::loginView(fn () => view(\Illuminate\Auth\Events\Login::class, [
|
||||
RateLimiter::for('two-factor', function (Request $request) {
|
||||
$loginId = $request->session()->get('login.id');
|
||||
|
||||
return Limit::perMinute(5)->by(is_string($loginId) ? $loginId : '');
|
||||
});
|
||||
|
||||
/** @phpstan-ignore argument.type */
|
||||
Fortify::loginView(fn () => view('auth.login', [
|
||||
'articles' => WebsiteArticle::latest('id')
|
||||
->take(4)
|
||||
->has('user')
|
||||
@@ -82,7 +92,7 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
private function authenticate()
|
||||
private function authenticate(): void
|
||||
{
|
||||
Fortify::authenticateThrough(fn () => array_filter([
|
||||
config('fortify.limiters.login') ? null : EnsureLoginIsNotThrottled::class,
|
||||
|
||||
@@ -14,7 +14,10 @@ class CurrentPasswordRule implements InvokableRule
|
||||
*/
|
||||
public function __invoke(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if (! Hash::check($value, Auth::user()->password)) {
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
if (! Hash::check(is_string($value) ? $value : '', $user->password)) {
|
||||
$fail('It seems like your current password is wrong.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ use Illuminate\Contracts\Validation\InvokableRule;
|
||||
|
||||
class GoogleRecaptchaRule implements InvokableRule
|
||||
{
|
||||
public function __invoke(string $attribute, mixed $value, Closure $fail)
|
||||
public function __invoke(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
// If recaptcha is disabled
|
||||
if ((int) setting('google_recaptcha_enabled') === 0) {
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
$client = new Client;
|
||||
@@ -29,10 +29,14 @@ class GoogleRecaptchaRule implements InvokableRule
|
||||
|
||||
if ($response->getStatusCode() !== 200) {
|
||||
$fail(__('The Google recaptcha was not successful.'));
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var \stdClass $body */
|
||||
$body = json_decode((string) $response->getBody());
|
||||
|
||||
return $body->success;
|
||||
if (! isset($body->success) || ! $body->success) {
|
||||
$fail(__('The Google recaptcha was not successful.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class Password implements Rule
|
||||
/**
|
||||
* Set the minimum length of the password.
|
||||
*/
|
||||
public function length(int $length)
|
||||
public function length(int $length): static
|
||||
{
|
||||
$this->length = $length;
|
||||
|
||||
|
||||
@@ -10,10 +10,11 @@ class TurnstileCheck implements ValidationRule
|
||||
{
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
$response = LaravelTurnstile::validate($value);
|
||||
$response = LaravelTurnstile::validate(is_string($value) ? $value : '');
|
||||
|
||||
if (! $response['success'] && setting('cloudflare_turnstile_enabled')) {
|
||||
$fail(__(config('turnstile.error_messages.turnstile_check_message')));
|
||||
$message = config('turnstile.error_messages.turnstile_check_message');
|
||||
$fail(__(is_string($message) ? $message : 'Turnstile check failed.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,10 @@ class ValidateInstallationKeyRule implements ValidationRule
|
||||
{
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if ($value !== WebsiteInstallation::first()->installation_key) {
|
||||
/** @var WebsiteInstallation|null $installation */
|
||||
$installation = WebsiteInstallation::first();
|
||||
|
||||
if (! $installation || $value !== $installation->installation_key) {
|
||||
$fail('The :attribute does not match');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,17 @@ use Illuminate\Support\Str;
|
||||
|
||||
class WebsiteWordfilterRule implements InvokableRule
|
||||
{
|
||||
public function __invoke(string $attribute, mixed $value, Closure $fail)
|
||||
public function __invoke(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
$words = WebsiteWordfilter::get()
|
||||
->pluck('word')
|
||||
->toArray();
|
||||
/** @var array<string> $words */
|
||||
$words = WebsiteWordfilter::pluck('word')->map(fn ($item) => is_scalar($item) ? (string) $item : '')->all();
|
||||
|
||||
if (setting('website_wordfilter_enabled') === '1' && in_array(strtolower((string) $value), $words) || Str::contains(strtolower((string) $value), $words)) {
|
||||
$fail(__('You entered something that is not allowed on :hotel', ['hotel' => setting('hotel_name')]));
|
||||
if (setting('website_wordfilter_enabled') === '1') {
|
||||
$stringValue = strtolower(is_scalar($value) ? (string) $value : '');
|
||||
|
||||
if (in_array($stringValue, $words) || Str::contains($stringValue, $words)) {
|
||||
$fail(__('You entered something that is not allowed on :hotel', ['hotel' => setting('hotel_name')]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,13 @@ use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
class ArticleService
|
||||
{
|
||||
public function getArticles(bool $paginate = false, int $perPage = 8): array|Collection|LengthAwarePaginator
|
||||
/**
|
||||
* @return Collection<int, WebsiteArticle>|LengthAwarePaginator<int, WebsiteArticle>
|
||||
*/
|
||||
public function getArticles(bool $paginate = false, int $perPage = 8): Collection|LengthAwarePaginator
|
||||
{
|
||||
$query = WebsiteArticle::with(['user' => function ($query): void {
|
||||
/** @var \Illuminate\Database\Eloquent\Builder $query */
|
||||
$query->select('id', 'username', 'look');
|
||||
}])->orderByDesc('id');
|
||||
|
||||
|
||||
@@ -9,11 +9,14 @@ use Illuminate\Http\Request;
|
||||
|
||||
class ReactionService
|
||||
{
|
||||
/**
|
||||
* @return array{success: bool, added?: bool, username?: string}
|
||||
*/
|
||||
public function toggleReaction(WebsiteArticle $article, User $user, Request $request): array
|
||||
{
|
||||
$reaction = $request->get('reaction');
|
||||
|
||||
if (! is_string($reaction) || ! in_array($reaction, config('habbo.reactions'))) {
|
||||
if (! is_string($reaction) || ! in_array($reaction, (array) config('habbo.reactions'))) {
|
||||
return ['success' => false];
|
||||
}
|
||||
|
||||
@@ -29,7 +32,7 @@ class ReactionService
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'added' => $existingReaction?->active ?? true,
|
||||
'added' => $existingReaction ? $existingReaction->active : true,
|
||||
'username' => $user->username,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,12 +8,18 @@ use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
class RareValueCategoriesService
|
||||
{
|
||||
/**
|
||||
* @return Collection<int, WebsiteRareValueCategory>
|
||||
*/
|
||||
public function fetchAllCategories(): Collection
|
||||
{
|
||||
return WebsiteRareValueCategory::all();
|
||||
}
|
||||
|
||||
public function fetchCategoriesByPriority(): Builder|Collection
|
||||
/**
|
||||
* @return Collection<int, WebsiteRareValueCategory>
|
||||
*/
|
||||
public function fetchCategoriesByPriority(): Collection
|
||||
{
|
||||
return WebsiteRareValueCategory::orderBy('priority')->with('furniture')->get();
|
||||
}
|
||||
@@ -23,12 +29,16 @@ class RareValueCategoriesService
|
||||
return WebsiteRareValueCategory::orderBy('priority')->whereId($id)->with('furniture')->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, WebsiteRareValueCategory>
|
||||
*/
|
||||
public function searchCategories(string $searchTerm): Collection
|
||||
{
|
||||
return WebsiteRareValueCategory::orderBy('priority')->whereHas('furniture', function ($query) use ($searchTerm): void {
|
||||
$query->where('name', 'like', '%' . $searchTerm . '%');
|
||||
})
|
||||
->with(['furniture' => function ($query) use ($searchTerm): void {
|
||||
/** @var Builder $query */
|
||||
$query->where('name', 'like', '%' . $searchTerm . '%');
|
||||
}])
|
||||
->get();
|
||||
|
||||
@@ -16,17 +16,20 @@ class StaffApplicationService
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, WebsiteOpenPosition>
|
||||
*/
|
||||
public function fetchOpenPositions(): Collection
|
||||
{
|
||||
return WebsiteOpenPosition::canApply()->with('permission')->get();
|
||||
}
|
||||
|
||||
public function hasUserAppliedForPosition($user, $positionId): bool
|
||||
public function hasUserAppliedForPosition(User $user, int $positionId): bool
|
||||
{
|
||||
return $user->applications()->where('rank_id', $positionId)->exists();
|
||||
}
|
||||
|
||||
public function isPositionOpenForApplication($position): bool
|
||||
public function isPositionOpenForApplication(WebsiteOpenPosition $position): bool
|
||||
{
|
||||
$currentTime = now();
|
||||
|
||||
|
||||
@@ -10,22 +10,32 @@ use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class StaffService
|
||||
{
|
||||
/**
|
||||
* @return Collection<int, Permission>
|
||||
*/
|
||||
public function fetchStaffPositions(): Collection
|
||||
{
|
||||
$cacheEnabled = setting('enable_caching') === '1';
|
||||
|
||||
if ($cacheEnabled && Cache::has('staff_positions')) {
|
||||
/** @var Collection<int, Permission> */
|
||||
return Cache::get('staff_positions');
|
||||
}
|
||||
|
||||
/** @var \App\Models\User|null $user */
|
||||
$user = Auth::user();
|
||||
$userRank = $user ? $user->rank : 0;
|
||||
|
||||
/** @var Collection<int, Permission> $employees */
|
||||
$employees = Permission::query()
|
||||
->select('id', 'rank_name', 'badge', 'staff_color', 'job_description')
|
||||
->when(Auth::user()->rank < (int) setting('min_rank_to_see_hidden_staff'), fn ($query) => $query->where('hidden_rank', false))
|
||||
->when($userRank < (int) setting('min_rank_to_see_hidden_staff'), fn ($query) => $query->where('hidden_rank', false))
|
||||
->where('id', '>=', setting('min_staff_rank'))
|
||||
->orderByDesc('id')
|
||||
->with(['users' => function ($query): void {
|
||||
->with(['users' => function ($query) use ($userRank): void {
|
||||
/** @var \Illuminate\Database\Eloquent\Builder $query */
|
||||
$query->select('id', 'username', 'rank', 'motto', 'look', 'hidden_staff', 'online')
|
||||
->when(Auth::user()->rank < (int) setting('min_rank_to_see_hidden_staff'), fn ($query) => $query->where('hidden_staff', false));
|
||||
->when($userRank < (int) setting('min_rank_to_see_hidden_staff'), fn ($query) => $query->where('hidden_staff', false));
|
||||
}])
|
||||
->get();
|
||||
|
||||
@@ -37,14 +47,19 @@ class StaffService
|
||||
return $employees;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, int>
|
||||
*/
|
||||
public function fetchEmployeeIds(): array
|
||||
{
|
||||
$cacheEnabled = setting('enable_caching') === '1';
|
||||
|
||||
if ($cacheEnabled && Cache::has('staff_ids')) {
|
||||
/** @var array<int, int> */
|
||||
return Cache::get('staff_ids');
|
||||
}
|
||||
|
||||
/** @var array<int, int> $staffIds */
|
||||
$staffIds = User::select('id')
|
||||
->where('rank', '>=', setting('min_staff_rank'))
|
||||
->get()
|
||||
|
||||
@@ -8,18 +8,24 @@ use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class TeamService
|
||||
{
|
||||
/**
|
||||
* @return Collection<int, WebsiteTeam>
|
||||
*/
|
||||
public function fetchTeams(): Collection
|
||||
{
|
||||
$cacheEnabled = setting('enable_caching') === '1';
|
||||
|
||||
if (Cache::has('hotel_teams') && $cacheEnabled) {
|
||||
/** @var Collection<int, WebsiteTeam> */
|
||||
return Cache::get('hotel_teams');
|
||||
}
|
||||
|
||||
/** @var Collection<int, WebsiteTeam> $employees */
|
||||
$employees = WebsiteTeam::select(['id', 'rank_name', 'badge', 'staff_color', 'staff_background', 'job_description'])
|
||||
->where('hidden_rank', false)
|
||||
->orderByDesc('id')
|
||||
->with(['users' => function ($query): void {
|
||||
/** @var \Illuminate\Database\Eloquent\Builder $query */
|
||||
$query->select('id', 'username', 'look', 'motto', 'rank', 'team_id', 'online');
|
||||
}])
|
||||
->get();
|
||||
|
||||
@@ -29,7 +29,7 @@ class FindRetrosService
|
||||
/**
|
||||
* Initialise Find Retros Service
|
||||
*/
|
||||
public function __construct(): void
|
||||
public function __construct()
|
||||
{
|
||||
$this->client = new Client(['verify' => false]);
|
||||
}
|
||||
@@ -43,8 +43,9 @@ class FindRetrosService
|
||||
return true;
|
||||
}
|
||||
|
||||
$cacheKey = sprintf(self::FIND_RETROS_CACHE_KEY, request()->ip());
|
||||
if (request()->ip() === '127.0.0.1') {
|
||||
$ip = request()->ip();
|
||||
$cacheKey = sprintf(self::FIND_RETROS_CACHE_KEY, is_scalar($ip) ? (string) $ip : '');
|
||||
if ($ip === '127.0.0.1') {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,7 +57,14 @@ class FindRetrosService
|
||||
return true;
|
||||
}
|
||||
|
||||
$uri = sprintf(self::FIND_RETROS_VERIFY_URI, config('habbo.findretros.api'), config('habbo.findretros.name'), request()->ip());
|
||||
$api = config('habbo.findretros.api');
|
||||
$name = config('habbo.findretros.name');
|
||||
|
||||
$uri = sprintf(self::FIND_RETROS_VERIFY_URI,
|
||||
is_scalar($api) ? (string) $api : '',
|
||||
is_scalar($name) ? (string) $name : '',
|
||||
is_scalar($ip) ? (string) $ip : ''
|
||||
);
|
||||
$request = $this->client->get($uri);
|
||||
$response = $request->getBody()->getContents();
|
||||
|
||||
@@ -74,6 +82,12 @@ class FindRetrosService
|
||||
*/
|
||||
public function getRedirectUri(): string
|
||||
{
|
||||
return sprintf(self::FIND_RETROS_REDIRECT_URI, config('habbo.findretros.api'), config('habbo.findretros.name'));
|
||||
$api = config('habbo.findretros.api');
|
||||
$name = config('habbo.findretros.name');
|
||||
|
||||
return sprintf(self::FIND_RETROS_REDIRECT_URI,
|
||||
is_scalar($api) ? (string) $api : '',
|
||||
is_scalar($name) ? (string) $name : ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,19 +7,29 @@ use Illuminate\Support\Collection;
|
||||
|
||||
class HousekeepingPermissionsService
|
||||
{
|
||||
/** @var Collection<string, int>|null */
|
||||
public ?Collection $permissions;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->permissions = WebsiteHousekeepingPermission::all()->pluck('min_rank', 'permission');
|
||||
/** @var Collection<string, int> */
|
||||
$permissions = WebsiteHousekeepingPermission::pluck('min_rank', 'permission');
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
|
||||
public function getOrDefault(string $permissionName, bool $default = false): bool
|
||||
{
|
||||
if (! array_key_exists($permissionName, $this->permissions->toArray())) {
|
||||
if (! $this->permissions instanceof Collection || ! $this->permissions->has($permissionName)) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
return auth()->check() && auth()->user()->rank >= (int) $this->permissions->get($permissionName);
|
||||
if (! auth()->check()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
return $user->rank >= (int) $this->permissions->get($permissionName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ class IpLookupService
|
||||
|
||||
public function __construct(private readonly string $apiKey) {}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function ipLookup(string $ip): array
|
||||
{
|
||||
$response = Http::acceptJson()->get(sprintf('%s/%s?api-key=%s', $this->baseUrl, $ip, $this->apiKey));
|
||||
|
||||
/** @var array<string, mixed> $json */
|
||||
$json = $response->json() ?? [];
|
||||
|
||||
if (! $response->ok()) {
|
||||
$message = array_key_exists('message', $response->json()) ? $response->json()['message'] : 'Unknown error';
|
||||
$message = array_key_exists('message', $json) ? $json['message'] : 'Unknown error';
|
||||
|
||||
return [
|
||||
'message' => $message,
|
||||
@@ -23,6 +29,6 @@ class IpLookupService
|
||||
];
|
||||
}
|
||||
|
||||
return $response->json();
|
||||
return $json;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,15 +8,19 @@ use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class PermissionsService
|
||||
{
|
||||
/** @var Collection<string, int>|null */
|
||||
public private(set) ?Collection $permissions;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->permissions = Cache::remember(
|
||||
/** @var Collection<string, int> $permissions */
|
||||
$permissions = Cache::remember(
|
||||
key: 'website_permissions',
|
||||
ttl: now()->addMinutes(30),
|
||||
callback: fn () => WebsitePermission::all()->pluck('min_rank', 'permission')
|
||||
callback: fn () => WebsitePermission::pluck('min_rank', 'permission')
|
||||
);
|
||||
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
|
||||
public function getOrDefault(string $permissionName, bool $default = false): bool
|
||||
@@ -29,17 +33,23 @@ class PermissionsService
|
||||
return false;
|
||||
}
|
||||
|
||||
return auth()->user()->rank >= (int) $this->permissions->get($permissionName);
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
return $user->rank >= (int) $this->permissions->get($permissionName);
|
||||
}
|
||||
|
||||
public function refresh(): void
|
||||
{
|
||||
Cache::forget('website_permissions');
|
||||
|
||||
$this->permissions = Cache::remember(
|
||||
/** @var Collection<string, int> $permissions */
|
||||
$permissions = Cache::remember(
|
||||
key: 'website_permissions',
|
||||
ttl: now()->addMinutes(30),
|
||||
callback: fn () => WebsitePermission::all()->pluck('min_rank', 'permission')
|
||||
callback: fn () => WebsitePermission::pluck('min_rank', 'permission')
|
||||
);
|
||||
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Services;
|
||||
|
||||
use App\Enums\CurrencyTypes;
|
||||
use App\Exceptions\RconConnectionException;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use JsonException;
|
||||
use Socket;
|
||||
@@ -14,13 +15,17 @@ class RconService
|
||||
|
||||
public private(set) bool $isConnected = false;
|
||||
|
||||
protected array $config = [];
|
||||
/** @var array{ip: string, port: int} */
|
||||
protected array $config;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$ip = setting('rcon_ip');
|
||||
$port = setting('rcon_port');
|
||||
|
||||
$this->config = [
|
||||
'ip' => setting('rcon_ip'),
|
||||
'port' => (int) setting('rcon_port'),
|
||||
'ip' => (string) $ip,
|
||||
'port' => is_numeric($port) ? (int) $port : 3001,
|
||||
];
|
||||
|
||||
$this->initialize();
|
||||
@@ -28,9 +33,9 @@ class RconService
|
||||
|
||||
private function initialize(): void
|
||||
{
|
||||
$this->socket = @socket_create(domain: AF_INET, type: SOCK_STREAM, protocol: SOL_TCP);
|
||||
$socket = @socket_create(domain: AF_INET, type: SOCK_STREAM, protocol: SOL_TCP);
|
||||
|
||||
if (! $this->socket) {
|
||||
if ($socket === false) {
|
||||
$error = socket_strerror(socket_last_error());
|
||||
Log::error("RCON initialization failed: {$error}");
|
||||
|
||||
@@ -39,6 +44,8 @@ class RconService
|
||||
return;
|
||||
}
|
||||
|
||||
$this->socket = $socket;
|
||||
|
||||
socket_set_option(
|
||||
socket: $this->socket,
|
||||
level: SOL_SOCKET,
|
||||
@@ -53,7 +60,7 @@ class RconService
|
||||
);
|
||||
|
||||
if (! @socket_connect($this->socket, $this->config['ip'], $this->config['port'])) {
|
||||
$error = socket_strerror(socket_last_error());
|
||||
$error = socket_strerror(socket_last_error($this->socket));
|
||||
Log::error("RCON connection failed: {$error}");
|
||||
|
||||
$this->closeConnection();
|
||||
@@ -80,12 +87,13 @@ class RconService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed>|null $data
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function sendCommand(string $command, ?array $data = null): bool
|
||||
{
|
||||
if (! $this->isConnected) {
|
||||
if (! $this->isConnected || ! $this->socket) {
|
||||
Log::error('RCON command failed: Not connected');
|
||||
$this->closeConnection();
|
||||
return false;
|
||||
@@ -106,7 +114,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function sendGift($user, int $item_id, string $message = 'Here is a gift.'): void
|
||||
public function sendGift(User $user, int $item_id, string $message = 'Here is a gift.'): void
|
||||
{
|
||||
$this->sendCommand('sendgift', [
|
||||
'user_id' => $user->id,
|
||||
@@ -118,7 +126,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function giveCredits($user, int $credits): void
|
||||
public function giveCredits(User $user, int $credits): void
|
||||
{
|
||||
$this->sendCommand('givecredits', [
|
||||
'user_id' => $user->id,
|
||||
@@ -129,7 +137,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function giveBadge($user, string $badge): void
|
||||
public function giveBadge(User $user, string $badge): void
|
||||
{
|
||||
$this->sendCommand('givebadge', [
|
||||
'user_id' => $user->id,
|
||||
@@ -140,7 +148,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function setMotto($user, string $motto): void
|
||||
public function setMotto(User $user, string $motto): void
|
||||
{
|
||||
$this->sendCommand('setmotto', [
|
||||
'user_id' => $user->id,
|
||||
@@ -159,7 +167,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function disconnectUser($user): void
|
||||
public function disconnectUser(User $user): void
|
||||
{
|
||||
$this->sendCommand('disconnect', [
|
||||
'user_id' => $user->id,
|
||||
@@ -170,7 +178,7 @@ class RconService
|
||||
/**
|
||||
* @throws RconConnectionException|JsonException
|
||||
*/
|
||||
public function givePoints($user, CurrencyTypes $type, int $amount): void
|
||||
public function givePoints(User $user, CurrencyTypes $type, int $amount): void
|
||||
{
|
||||
$this->sendCommand('givepoints', [
|
||||
'user_id' => $user->id,
|
||||
@@ -183,7 +191,7 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function giveGotw($user, int $amount): void
|
||||
public function giveGotw(User $user, int $amount): void
|
||||
{
|
||||
$this->givePoints($user, CurrencyTypes::Points, $amount);
|
||||
}
|
||||
@@ -192,7 +200,7 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function giveDiamonds($user, int $amount): void
|
||||
public function giveDiamonds(User $user, int $amount): void
|
||||
{
|
||||
$this->givePoints($user, CurrencyTypes::Diamonds, $amount);
|
||||
}
|
||||
@@ -201,16 +209,16 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function giveDuckets($user, int $amount): void
|
||||
public function giveDuckets(User $user, int $amount): void
|
||||
{
|
||||
$this->givePoints($user, CurrencyTypes::DUCKETS, $amount);
|
||||
$this->givePoints($user, CurrencyTypes::Duckets, $amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function setRank($user, int $rank): void
|
||||
public function setRank(User $user, int $rank): void
|
||||
{
|
||||
$this->sendCommand('setrank', [
|
||||
'user_id' => $user->id,
|
||||
@@ -231,7 +239,7 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function alertUser($user, string $message): void
|
||||
public function alertUser(User $user, string $message): void
|
||||
{
|
||||
$this->sendCommand('alertuser', [
|
||||
'user_id' => $user->id,
|
||||
@@ -243,7 +251,7 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function forwardUser($user, int $roomId): void
|
||||
public function forwardUser(User $user, int $roomId): void
|
||||
{
|
||||
$this->sendCommand('forwarduser', [
|
||||
'user_id' => $user->id,
|
||||
@@ -255,7 +263,7 @@ class RconService
|
||||
* @throws RconConnectionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function updateConfig($user, string $command): void
|
||||
public function updateConfig(User $user, string $command): void
|
||||
{
|
||||
$this->sendCommand('executecommand', [
|
||||
'user_id' => $user->id,
|
||||
|
||||
@@ -10,46 +10,49 @@ use Throwable;
|
||||
|
||||
class SettingsService
|
||||
{
|
||||
public private(set) ?Collection $settings;
|
||||
/** @var Collection<string, string> */
|
||||
public private(set) Collection $settings;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
try {
|
||||
$this->settings = Cache::remember(
|
||||
key: 'website_settings',
|
||||
ttl: now()->addMinutes(5),
|
||||
callback: fn () => Schema::hasTable('website_settings')
|
||||
? WebsiteSetting::all()->pluck('value', 'key')
|
||||
: collect()
|
||||
);
|
||||
} catch (Throwable) {
|
||||
$this->settings = collect();
|
||||
}
|
||||
$this->refresh();
|
||||
}
|
||||
|
||||
public function getOrDefault(string $settingName, ?string $default = null): string
|
||||
{
|
||||
if (! $this->settings instanceof Collection) {
|
||||
return (string) $default;
|
||||
}
|
||||
|
||||
return (string) $this->settings->get($settingName, $default);
|
||||
}
|
||||
|
||||
public function refresh(): void
|
||||
{
|
||||
Cache::forget('website_settings');
|
||||
|
||||
|
||||
try {
|
||||
$this->settings = Cache::remember(
|
||||
/** @var mixed $result */
|
||||
$result = Cache::remember(
|
||||
key: 'website_settings',
|
||||
ttl: now()->addMinutes(5),
|
||||
callback: fn () => Schema::hasTable('website_settings')
|
||||
? WebsiteSetting::all()->pluck('value', 'key')
|
||||
callback: fn () => Schema::hasTable('website_settings')
|
||||
? WebsiteSetting::pluck('value', 'key')
|
||||
: collect()
|
||||
);
|
||||
|
||||
/** @var array<string, string> $data */
|
||||
$data = [];
|
||||
|
||||
if ($result instanceof Collection) {
|
||||
foreach ($result as $key => $value) {
|
||||
$data[(string) $key] = is_scalar($value) ? (string) $value : '';
|
||||
}
|
||||
} elseif (is_array($result)) {
|
||||
foreach ($result as $key => $value) {
|
||||
$data[(string) $key] = is_scalar($value) ? (string) $value : '';
|
||||
}
|
||||
}
|
||||
|
||||
$this->settings = new Collection($data);
|
||||
} catch (Throwable) {
|
||||
$this->settings = collect();
|
||||
$this->settings = new Collection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,26 @@ use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Jenssegers\Agent\Agent;
|
||||
|
||||
use App\Models\Session;
|
||||
|
||||
class SessionService
|
||||
{
|
||||
/**
|
||||
* @return Collection<int, \stdClass>
|
||||
*/
|
||||
public function fetchSessionLogs(Request $request): Collection
|
||||
{
|
||||
return collect(
|
||||
Auth::user()->sessions,
|
||||
)->map(function ($session) use ($request) {
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
/** @var Collection<int, Session> $sessions */
|
||||
$sessions = $user->sessions;
|
||||
|
||||
return $sessions->map(function (Session $session) use ($request): \stdClass {
|
||||
$agent = $this->createAgent($session);
|
||||
|
||||
return (object) [
|
||||
/** @var \stdClass $obj */
|
||||
$obj = (object) [
|
||||
'agent' => [
|
||||
'is_desktop' => $agent->isDesktop(),
|
||||
'platform' => $agent->platform(),
|
||||
@@ -25,14 +35,16 @@ class SessionService
|
||||
],
|
||||
'ip_address' => $session->ip_address,
|
||||
'is_current_device' => $session->id === $request->session()->getId(),
|
||||
'last_active' => \Illuminate\Support\Facades\Date::createFromTimestamp($session->last_activity)->diffForHumans(),
|
||||
'last_active' => \Illuminate\Support\Facades\Date::createFromTimestamp((int) $session->last_activity)->diffForHumans(),
|
||||
];
|
||||
});
|
||||
|
||||
return $obj;
|
||||
})->values();
|
||||
}
|
||||
|
||||
protected function createAgent($session): Agent
|
||||
protected function createAgent(Session $session): Agent
|
||||
{
|
||||
return tap(new Agent, function ($agent) use ($session): void {
|
||||
return tap(new Agent, function (Agent $agent) use ($session): void {
|
||||
$agent->setUserAgent($session->user_agent);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,11 +7,18 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class UserApiService
|
||||
{
|
||||
/**
|
||||
* @param array<int, string> $columns
|
||||
*/
|
||||
public function fetchUser(string $username, array $columns): User
|
||||
{
|
||||
return User::select($columns)->where('username', '=', $username)->first();
|
||||
return User::select($columns)->where('username', '=', $username)->firstOrFail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, string> $columns
|
||||
* @return Builder<User>
|
||||
*/
|
||||
public function onlineUsers($columns = ['username', 'motto', 'look'], bool $randomOrder = true): Builder
|
||||
{
|
||||
$query = User::select($columns)->where('online', '=', '1');
|
||||
|
||||
-1545
File diff suppressed because it is too large
Load Diff
+11
@@ -20,6 +20,17 @@
|
||||
0 => 'BladeUI\\Icons\\BladeIconsServiceProvider',
|
||||
),
|
||||
),
|
||||
'coderflex/laravel-turnstile' =>
|
||||
array (
|
||||
'aliases' =>
|
||||
array (
|
||||
'LaravelTurnstile' => 'Coderflex\\LaravelTurnstile\\Facades\\LaravelTurnstile',
|
||||
),
|
||||
'providers' =>
|
||||
array (
|
||||
0 => 'Coderflex\\LaravelTurnstile\\LaravelTurnstileServiceProvider',
|
||||
),
|
||||
),
|
||||
'filament/actions' =>
|
||||
array (
|
||||
'providers' =>
|
||||
|
||||
-11602
File diff suppressed because it is too large
Load Diff
+78
-76
@@ -25,45 +25,46 @@
|
||||
21 => 'Illuminate\\View\\ViewServiceProvider',
|
||||
22 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider',
|
||||
23 => 'BladeUI\\Icons\\BladeIconsServiceProvider',
|
||||
24 => 'Filament\\Actions\\ActionsServiceProvider',
|
||||
25 => 'Filament\\FilamentServiceProvider',
|
||||
26 => 'Filament\\Forms\\FormsServiceProvider',
|
||||
27 => 'Filament\\Infolists\\InfolistsServiceProvider',
|
||||
28 => 'Filament\\Notifications\\NotificationsServiceProvider',
|
||||
29 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider',
|
||||
30 => 'Filament\\Schemas\\SchemasServiceProvider',
|
||||
31 => 'Filament\\Support\\SupportServiceProvider',
|
||||
32 => 'Filament\\Tables\\TablesServiceProvider',
|
||||
33 => 'Filament\\Upgrade\\UpgradeServiceProvider',
|
||||
34 => 'Filament\\Widgets\\WidgetsServiceProvider',
|
||||
35 => 'Flowframe\\Trend\\TrendServiceProvider',
|
||||
36 => 'Clockwork\\Support\\Laravel\\ClockworkServiceProvider',
|
||||
37 => 'Jenssegers\\Agent\\AgentServiceProvider',
|
||||
38 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider',
|
||||
39 => 'Laravel\\Fortify\\FortifyServiceProvider',
|
||||
40 => 'Laravel\\Sail\\SailServiceProvider',
|
||||
41 => 'Laravel\\Sanctum\\SanctumServiceProvider',
|
||||
42 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
||||
43 => 'Livewire\\LivewireServiceProvider',
|
||||
44 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
45 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
||||
46 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
47 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
|
||||
48 => 'Qirolab\\Theme\\ThemeServiceProvider',
|
||||
49 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider',
|
||||
50 => 'RyanChandler\\LaravelCloudflareTurnstile\\LaravelCloudflareTurnstileServiceProvider',
|
||||
51 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
52 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
|
||||
53 => 'Spatie\\LaravelRay\\RayServiceProvider',
|
||||
54 => 'Srmklive\\PayPal\\Providers\\PayPalServiceProvider',
|
||||
55 => 'Stevebauman\\Purify\\PurifyServiceProvider',
|
||||
56 => 'App\\Providers\\AppServiceProvider',
|
||||
57 => 'App\\Providers\\AuthServiceProvider',
|
||||
58 => 'App\\Providers\\EventServiceProvider',
|
||||
59 => 'App\\Providers\\Filament\\AdminFilamentPanelProvider',
|
||||
60 => 'App\\Providers\\RouteServiceProvider',
|
||||
61 => 'App\\Providers\\FortifyServiceProvider',
|
||||
62 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
24 => 'Coderflex\\LaravelTurnstile\\LaravelTurnstileServiceProvider',
|
||||
25 => 'Filament\\Actions\\ActionsServiceProvider',
|
||||
26 => 'Filament\\FilamentServiceProvider',
|
||||
27 => 'Filament\\Forms\\FormsServiceProvider',
|
||||
28 => 'Filament\\Infolists\\InfolistsServiceProvider',
|
||||
29 => 'Filament\\Notifications\\NotificationsServiceProvider',
|
||||
30 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider',
|
||||
31 => 'Filament\\Schemas\\SchemasServiceProvider',
|
||||
32 => 'Filament\\Support\\SupportServiceProvider',
|
||||
33 => 'Filament\\Tables\\TablesServiceProvider',
|
||||
34 => 'Filament\\Upgrade\\UpgradeServiceProvider',
|
||||
35 => 'Filament\\Widgets\\WidgetsServiceProvider',
|
||||
36 => 'Flowframe\\Trend\\TrendServiceProvider',
|
||||
37 => 'Clockwork\\Support\\Laravel\\ClockworkServiceProvider',
|
||||
38 => 'Jenssegers\\Agent\\AgentServiceProvider',
|
||||
39 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider',
|
||||
40 => 'Laravel\\Fortify\\FortifyServiceProvider',
|
||||
41 => 'Laravel\\Sail\\SailServiceProvider',
|
||||
42 => 'Laravel\\Sanctum\\SanctumServiceProvider',
|
||||
43 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
||||
44 => 'Livewire\\LivewireServiceProvider',
|
||||
45 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
46 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
||||
47 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
48 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
|
||||
49 => 'Qirolab\\Theme\\ThemeServiceProvider',
|
||||
50 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider',
|
||||
51 => 'RyanChandler\\LaravelCloudflareTurnstile\\LaravelCloudflareTurnstileServiceProvider',
|
||||
52 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
53 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
|
||||
54 => 'Spatie\\LaravelRay\\RayServiceProvider',
|
||||
55 => 'Srmklive\\PayPal\\Providers\\PayPalServiceProvider',
|
||||
56 => 'Stevebauman\\Purify\\PurifyServiceProvider',
|
||||
57 => 'App\\Providers\\AppServiceProvider',
|
||||
58 => 'App\\Providers\\AuthServiceProvider',
|
||||
59 => 'App\\Providers\\EventServiceProvider',
|
||||
60 => 'App\\Providers\\Filament\\AdminFilamentPanelProvider',
|
||||
61 => 'App\\Providers\\RouteServiceProvider',
|
||||
62 => 'App\\Providers\\FortifyServiceProvider',
|
||||
63 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
),
|
||||
'eager' =>
|
||||
array (
|
||||
@@ -79,43 +80,44 @@
|
||||
9 => 'Illuminate\\View\\ViewServiceProvider',
|
||||
10 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider',
|
||||
11 => 'BladeUI\\Icons\\BladeIconsServiceProvider',
|
||||
12 => 'Filament\\Actions\\ActionsServiceProvider',
|
||||
13 => 'Filament\\FilamentServiceProvider',
|
||||
14 => 'Filament\\Forms\\FormsServiceProvider',
|
||||
15 => 'Filament\\Infolists\\InfolistsServiceProvider',
|
||||
16 => 'Filament\\Notifications\\NotificationsServiceProvider',
|
||||
17 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider',
|
||||
18 => 'Filament\\Schemas\\SchemasServiceProvider',
|
||||
19 => 'Filament\\Support\\SupportServiceProvider',
|
||||
20 => 'Filament\\Tables\\TablesServiceProvider',
|
||||
21 => 'Filament\\Upgrade\\UpgradeServiceProvider',
|
||||
22 => 'Filament\\Widgets\\WidgetsServiceProvider',
|
||||
23 => 'Flowframe\\Trend\\TrendServiceProvider',
|
||||
24 => 'Clockwork\\Support\\Laravel\\ClockworkServiceProvider',
|
||||
25 => 'Jenssegers\\Agent\\AgentServiceProvider',
|
||||
26 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider',
|
||||
27 => 'Laravel\\Fortify\\FortifyServiceProvider',
|
||||
28 => 'Laravel\\Sanctum\\SanctumServiceProvider',
|
||||
29 => 'Livewire\\LivewireServiceProvider',
|
||||
30 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
31 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
||||
32 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
33 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
|
||||
34 => 'Qirolab\\Theme\\ThemeServiceProvider',
|
||||
35 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider',
|
||||
36 => 'RyanChandler\\LaravelCloudflareTurnstile\\LaravelCloudflareTurnstileServiceProvider',
|
||||
37 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
38 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
|
||||
39 => 'Spatie\\LaravelRay\\RayServiceProvider',
|
||||
40 => 'Srmklive\\PayPal\\Providers\\PayPalServiceProvider',
|
||||
41 => 'Stevebauman\\Purify\\PurifyServiceProvider',
|
||||
42 => 'App\\Providers\\AppServiceProvider',
|
||||
43 => 'App\\Providers\\AuthServiceProvider',
|
||||
44 => 'App\\Providers\\EventServiceProvider',
|
||||
45 => 'App\\Providers\\Filament\\AdminFilamentPanelProvider',
|
||||
46 => 'App\\Providers\\RouteServiceProvider',
|
||||
47 => 'App\\Providers\\FortifyServiceProvider',
|
||||
48 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
12 => 'Coderflex\\LaravelTurnstile\\LaravelTurnstileServiceProvider',
|
||||
13 => 'Filament\\Actions\\ActionsServiceProvider',
|
||||
14 => 'Filament\\FilamentServiceProvider',
|
||||
15 => 'Filament\\Forms\\FormsServiceProvider',
|
||||
16 => 'Filament\\Infolists\\InfolistsServiceProvider',
|
||||
17 => 'Filament\\Notifications\\NotificationsServiceProvider',
|
||||
18 => 'Filament\\QueryBuilder\\QueryBuilderServiceProvider',
|
||||
19 => 'Filament\\Schemas\\SchemasServiceProvider',
|
||||
20 => 'Filament\\Support\\SupportServiceProvider',
|
||||
21 => 'Filament\\Tables\\TablesServiceProvider',
|
||||
22 => 'Filament\\Upgrade\\UpgradeServiceProvider',
|
||||
23 => 'Filament\\Widgets\\WidgetsServiceProvider',
|
||||
24 => 'Flowframe\\Trend\\TrendServiceProvider',
|
||||
25 => 'Clockwork\\Support\\Laravel\\ClockworkServiceProvider',
|
||||
26 => 'Jenssegers\\Agent\\AgentServiceProvider',
|
||||
27 => 'Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider',
|
||||
28 => 'Laravel\\Fortify\\FortifyServiceProvider',
|
||||
29 => 'Laravel\\Sanctum\\SanctumServiceProvider',
|
||||
30 => 'Livewire\\LivewireServiceProvider',
|
||||
31 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
||||
33 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
34 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
|
||||
35 => 'Qirolab\\Theme\\ThemeServiceProvider',
|
||||
36 => 'RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider',
|
||||
37 => 'RyanChandler\\LaravelCloudflareTurnstile\\LaravelCloudflareTurnstileServiceProvider',
|
||||
38 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
39 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
|
||||
40 => 'Spatie\\LaravelRay\\RayServiceProvider',
|
||||
41 => 'Srmklive\\PayPal\\Providers\\PayPalServiceProvider',
|
||||
42 => 'Stevebauman\\Purify\\PurifyServiceProvider',
|
||||
43 => 'App\\Providers\\AppServiceProvider',
|
||||
44 => 'App\\Providers\\AuthServiceProvider',
|
||||
45 => 'App\\Providers\\EventServiceProvider',
|
||||
46 => 'App\\Providers\\Filament\\AdminFilamentPanelProvider',
|
||||
47 => 'App\\Providers\\RouteServiceProvider',
|
||||
48 => 'App\\Providers\\FortifyServiceProvider',
|
||||
49 => 'Spatie\\Activitylog\\ActivitylogServiceProvider',
|
||||
),
|
||||
'deferred' =>
|
||||
array (
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"keywords": ["framework", "laravel"],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.5",
|
||||
"php": "^8.4",
|
||||
"ext-sockets": "*",
|
||||
"coderflex/laravel-turnstile": "^2.1",
|
||||
"doctrine/dbal": "^4.0",
|
||||
|
||||
Generated
+343
-139
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "0e756216f3e8b8de38da5692488cd7ca",
|
||||
"content-hash": "72f6437fdb23efbe3a870500c5108616",
|
||||
"packages": [
|
||||
{
|
||||
"name": "anourvalar/eloquent-serialize",
|
||||
@@ -565,6 +565,80 @@
|
||||
],
|
||||
"time": "2024-07-16T11:13:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "coderflex/laravel-turnstile",
|
||||
"version": "2.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/coderflexx/laravel-turnstile.git",
|
||||
"reference": "1c1d0c5829851efaa1febcde34733537780eb0a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/coderflexx/laravel-turnstile/zipball/1c1d0c5829851efaa1febcde34733537780eb0a9",
|
||||
"reference": "1c1d0c5829851efaa1febcde34733537780eb0a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^7.7",
|
||||
"illuminate/contracts": "^10.0|^11.0|^12.0",
|
||||
"php": "^8.2|^8.3",
|
||||
"spatie/laravel-package-tools": "^1.14.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.0",
|
||||
"nunomaduro/collision": "^7.0|^8.0",
|
||||
"nunomaduro/larastan": "^2.8.0|^3.1.0",
|
||||
"orchestra/testbench": "^8.0|^9.0|^10.0",
|
||||
"pestphp/pest": "^2.0|^3.7",
|
||||
"pestphp/pest-plugin-arch": "^2.0|^3.0",
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
|
||||
"phpstan/phpstan-phpunit": "^1.0|^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"LaravelTurnstile": "Coderflex\\LaravelTurnstile\\Facades\\LaravelTurnstile"
|
||||
},
|
||||
"providers": [
|
||||
"Coderflex\\LaravelTurnstile\\LaravelTurnstileServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Coderflex\\LaravelTurnstile\\": "src/",
|
||||
"Coderflex\\LaravelTurnstile\\Database\\Factories\\": "database/factories/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "ousid",
|
||||
"email": "oussama@coderflex.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A package to help you implement the Cloudflare turnstile \"CAPTCHA Alternative\"",
|
||||
"homepage": "https://github.com/coderflexx/laravel-turnstile",
|
||||
"keywords": [
|
||||
"cloudflare",
|
||||
"coderflex",
|
||||
"laravel",
|
||||
"laravel-turnstile",
|
||||
"turnstile"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/coderflexx/laravel-turnstile/issues",
|
||||
"source": "https://github.com/coderflexx/laravel-turnstile/tree/2.1.1"
|
||||
},
|
||||
"time": "2025-03-01T13:04:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "danharrin/date-format-converter",
|
||||
"version": "v0.3.1",
|
||||
@@ -1363,16 +1437,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/actions",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/actions.git",
|
||||
"reference": "9498be6d520979e8613b576a96c430aa1e8725db"
|
||||
"reference": "583efc16a403b4d452b7fb859e883b9b464b35a3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/9498be6d520979e8613b576a96c430aa1e8725db",
|
||||
"reference": "9498be6d520979e8613b576a96c430aa1e8725db",
|
||||
"url": "https://api.github.com/repos/filamentphp/actions/zipball/583efc16a403b4d452b7fb859e883b9b464b35a3",
|
||||
"reference": "583efc16a403b4d452b7fb859e883b9b464b35a3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1408,20 +1482,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T12:49:20+00:00"
|
||||
"time": "2026-01-16T10:31:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/filament",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/panels.git",
|
||||
"reference": "0b7eb4fdf32c41b6789bfdf60c9ba3056c99de1c"
|
||||
"reference": "3b9c96737e5cbf092be71550628b2df55fcdcd57"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/0b7eb4fdf32c41b6789bfdf60c9ba3056c99de1c",
|
||||
"reference": "0b7eb4fdf32c41b6789bfdf60c9ba3056c99de1c",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/3b9c96737e5cbf092be71550628b2df55fcdcd57",
|
||||
"reference": "3b9c96737e5cbf092be71550628b2df55fcdcd57",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1465,20 +1539,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T12:49:48+00:00"
|
||||
"time": "2026-01-16T10:31:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/forms",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/forms.git",
|
||||
"reference": "6865ac8caa164ea5e274167297bc3bd5335cd5f4"
|
||||
"reference": "e974d21d9f88f130eb3e474d85aa8e9b8b5e4054"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/6865ac8caa164ea5e274167297bc3bd5335cd5f4",
|
||||
"reference": "6865ac8caa164ea5e274167297bc3bd5335cd5f4",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/e974d21d9f88f130eb3e474d85aa8e9b8b5e4054",
|
||||
"reference": "e974d21d9f88f130eb3e474d85aa8e9b8b5e4054",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1515,20 +1589,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T15:33:24+00:00"
|
||||
"time": "2026-01-16T10:32:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/infolists",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/infolists.git",
|
||||
"reference": "beaa1bc7ec115369b5add11fc6e05fe234259d67"
|
||||
"reference": "a49a8124e4e2ccc46b0c67725b826160ae33ba8d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/beaa1bc7ec115369b5add11fc6e05fe234259d67",
|
||||
"reference": "beaa1bc7ec115369b5add11fc6e05fe234259d67",
|
||||
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/a49a8124e4e2ccc46b0c67725b826160ae33ba8d",
|
||||
"reference": "a49a8124e4e2ccc46b0c67725b826160ae33ba8d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1560,11 +1634,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T12:49:18+00:00"
|
||||
"time": "2026-01-16T10:32:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/notifications",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/notifications.git",
|
||||
@@ -1611,16 +1685,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/query-builder",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/query-builder.git",
|
||||
"reference": "d9d3ecf78a87c4fad9dad7959d7280bc73f780ed"
|
||||
"reference": "af25a2143d001995864b5135e54e67f56d60f330"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/query-builder/zipball/d9d3ecf78a87c4fad9dad7959d7280bc73f780ed",
|
||||
"reference": "d9d3ecf78a87c4fad9dad7959d7280bc73f780ed",
|
||||
"url": "https://api.github.com/repos/filamentphp/query-builder/zipball/af25a2143d001995864b5135e54e67f56d60f330",
|
||||
"reference": "af25a2143d001995864b5135e54e67f56d60f330",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1653,20 +1727,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2025-12-30T13:02:08+00:00"
|
||||
"time": "2026-01-16T10:31:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/schemas",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/schemas.git",
|
||||
"reference": "ca4af5fe00d460dce3c1547c4021c913d69134e1"
|
||||
"reference": "1b03f3a6038f2d7ad0376fbd92532f0bb4bf8495"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/ca4af5fe00d460dce3c1547c4021c913d69134e1",
|
||||
"reference": "ca4af5fe00d460dce3c1547c4021c913d69134e1",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/1b03f3a6038f2d7ad0376fbd92532f0bb4bf8495",
|
||||
"reference": "1b03f3a6038f2d7ad0376fbd92532f0bb4bf8495",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1698,20 +1772,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T12:50:00+00:00"
|
||||
"time": "2026-01-09T15:08:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/support",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/support.git",
|
||||
"reference": "da8504394555982af3d6d948f7665af6b43b4ff0"
|
||||
"reference": "895ce0a1b2cd93984842a0a32d85be858f3437d4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/da8504394555982af3d6d948f7665af6b43b4ff0",
|
||||
"reference": "da8504394555982af3d6d948f7665af6b43b4ff0",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/895ce0a1b2cd93984842a0a32d85be858f3437d4",
|
||||
"reference": "895ce0a1b2cd93984842a0a32d85be858f3437d4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1756,20 +1830,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T15:35:02+00:00"
|
||||
"time": "2026-01-09T15:08:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/tables",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/tables.git",
|
||||
"reference": "9b6de34dc711b7e16400913463afdf3f43e7e861"
|
||||
"reference": "688f1b9aee8cbfda5c0609469cc4447351a76790"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/9b6de34dc711b7e16400913463afdf3f43e7e861",
|
||||
"reference": "9b6de34dc711b7e16400913463afdf3f43e7e861",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/688f1b9aee8cbfda5c0609469cc4447351a76790",
|
||||
"reference": "688f1b9aee8cbfda5c0609469cc4447351a76790",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1802,20 +1876,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T15:33:29+00:00"
|
||||
"time": "2026-01-16T10:31:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filament/widgets",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/widgets.git",
|
||||
"reference": "a3c154738fe5224ccdd144ddf06068f069bc0917"
|
||||
"reference": "aab40f5e0919963a7bd1993ff1b65949d5508cc5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/a3c154738fe5224ccdd144ddf06068f069bc0917",
|
||||
"reference": "a3c154738fe5224ccdd144ddf06068f069bc0917",
|
||||
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/aab40f5e0919963a7bd1993ff1b65949d5508cc5",
|
||||
"reference": "aab40f5e0919963a7bd1993ff1b65949d5508cc5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1846,7 +1920,7 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"source": "https://github.com/filamentphp/filament"
|
||||
},
|
||||
"time": "2026-01-07T12:49:18+00:00"
|
||||
"time": "2026-01-16T10:31:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "flowframe/laravel-trend",
|
||||
@@ -2805,16 +2879,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v12.45.2",
|
||||
"version": "v12.47.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "d644693433290996bf764397b086228ce81781e6"
|
||||
"reference": "ab8114c2e78f32e64eb238fc4b495bea3f8b80ec"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/d644693433290996bf764397b086228ce81781e6",
|
||||
"reference": "d644693433290996bf764397b086228ce81781e6",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/ab8114c2e78f32e64eb238fc4b495bea3f8b80ec",
|
||||
"reference": "ab8114c2e78f32e64eb238fc4b495bea3f8b80ec",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3023,20 +3097,20 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2026-01-07T15:03:01+00:00"
|
||||
"time": "2026-01-13T15:29:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
"version": "v0.3.8",
|
||||
"version": "v0.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/prompts.git",
|
||||
"reference": "096748cdfb81988f60090bbb839ce3205ace0d35"
|
||||
"reference": "360ba095ef9f51017473505191fbd4ab73e1cab3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/096748cdfb81988f60090bbb839ce3205ace0d35",
|
||||
"reference": "096748cdfb81988f60090bbb839ce3205ace0d35",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/360ba095ef9f51017473505191fbd4ab73e1cab3",
|
||||
"reference": "360ba095ef9f51017473505191fbd4ab73e1cab3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3080,22 +3154,22 @@
|
||||
"description": "Add beautiful and user-friendly forms to your command-line applications.",
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/prompts/issues",
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.3.8"
|
||||
"source": "https://github.com/laravel/prompts/tree/v0.3.10"
|
||||
},
|
||||
"time": "2025-11-21T20:52:52+00:00"
|
||||
"time": "2026-01-13T20:29:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
"version": "v4.2.2",
|
||||
"version": "v4.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sanctum.git",
|
||||
"reference": "fd447754d2d3f56950d53b930128af2e3b617de9"
|
||||
"reference": "47d26f1d310879ff757b971f5a6fc631d18663fd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/fd447754d2d3f56950d53b930128af2e3b617de9",
|
||||
"reference": "fd447754d2d3f56950d53b930128af2e3b617de9",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/47d26f1d310879ff757b971f5a6fc631d18663fd",
|
||||
"reference": "47d26f1d310879ff757b971f5a6fc631d18663fd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3145,20 +3219,20 @@
|
||||
"issues": "https://github.com/laravel/sanctum/issues",
|
||||
"source": "https://github.com/laravel/sanctum"
|
||||
},
|
||||
"time": "2026-01-06T23:11:51+00:00"
|
||||
"time": "2026-01-11T18:20:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
"version": "v2.0.7",
|
||||
"version": "v2.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/serializable-closure.git",
|
||||
"reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd"
|
||||
"reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/cb291e4c998ac50637c7eeb58189c14f5de5b9dd",
|
||||
"reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd",
|
||||
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/7581a4407012f5f53365e11bafc520fd7f36bc9b",
|
||||
"reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3206,7 +3280,7 @@
|
||||
"issues": "https://github.com/laravel/serializable-closure/issues",
|
||||
"source": "https://github.com/laravel/serializable-closure"
|
||||
},
|
||||
"time": "2025-11-21T20:52:36+00:00"
|
||||
"time": "2026-01-08T16:22:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
@@ -3744,20 +3818,20 @@
|
||||
},
|
||||
{
|
||||
"name": "league/uri",
|
||||
"version": "7.7.0",
|
||||
"version": "7.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/uri.git",
|
||||
"reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807"
|
||||
"reference": "4436c6ec8d458e4244448b069cc572d088230b76"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri/zipball/8d587cddee53490f9b82bf203d3a9aa7ea4f9807",
|
||||
"reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri/zipball/4436c6ec8d458e4244448b069cc572d088230b76",
|
||||
"reference": "4436c6ec8d458e4244448b069cc572d088230b76",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/uri-interfaces": "^7.7",
|
||||
"league/uri-interfaces": "^7.8",
|
||||
"php": "^8.1",
|
||||
"psr/http-factory": "^1"
|
||||
},
|
||||
@@ -3771,11 +3845,11 @@
|
||||
"ext-gmp": "to improve IPV4 host parsing",
|
||||
"ext-intl": "to handle IDN host with the best performance",
|
||||
"ext-uri": "to use the PHP native URI class",
|
||||
"jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain",
|
||||
"league/uri-components": "Needed to easily manipulate URI objects components",
|
||||
"league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP",
|
||||
"jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain",
|
||||
"league/uri-components": "to provide additional tools to manipulate URI objects components",
|
||||
"league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP",
|
||||
"php-64bit": "to improve IPV4 host parsing",
|
||||
"rowbot/url": "to handle WHATWG URL",
|
||||
"rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification",
|
||||
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -3830,7 +3904,7 @@
|
||||
"docs": "https://uri.thephpleague.com",
|
||||
"forum": "https://thephpleague.slack.com",
|
||||
"issues": "https://github.com/thephpleague/uri-src/issues",
|
||||
"source": "https://github.com/thephpleague/uri/tree/7.7.0"
|
||||
"source": "https://github.com/thephpleague/uri/tree/7.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3838,37 +3912,36 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-07T16:02:06+00:00"
|
||||
"time": "2026-01-14T17:24:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/uri-components",
|
||||
"version": "7.7.0",
|
||||
"version": "7.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/uri-components.git",
|
||||
"reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374"
|
||||
"reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-components/zipball/005f8693ce8c1f16f80e88a05cbf08da04c1c374",
|
||||
"reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-components/zipball/8b5ffcebcc0842b76eb80964795bd56a8333b2ba",
|
||||
"reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/uri": "^7.7",
|
||||
"league/uri": "^7.8",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"suggest": {
|
||||
"bakame/aide-uri": "A polyfill for PHP8.1 until PHP8.4 to add support to PHP Native URI parser",
|
||||
"ext-bcmath": "to improve IPV4 host parsing",
|
||||
"ext-fileinfo": "to create Data URI from file contennts",
|
||||
"ext-gmp": "to improve IPV4 host parsing",
|
||||
"ext-intl": "to handle IDN host with the best performance",
|
||||
"ext-mbstring": "to use the sorting algorithm of URLSearchParams",
|
||||
"jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain",
|
||||
"league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP",
|
||||
"jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain",
|
||||
"league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP",
|
||||
"php-64bit": "to improve IPV4 host parsing",
|
||||
"rowbot/url": "to handle WHATWG URL",
|
||||
"rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification",
|
||||
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -3915,7 +3988,7 @@
|
||||
"docs": "https://uri.thephpleague.com",
|
||||
"forum": "https://thephpleague.slack.com",
|
||||
"issues": "https://github.com/thephpleague/uri-src/issues",
|
||||
"source": "https://github.com/thephpleague/uri-components/tree/7.7.0"
|
||||
"source": "https://github.com/thephpleague/uri-components/tree/7.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3923,20 +3996,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-07T16:02:56+00:00"
|
||||
"time": "2026-01-14T17:24:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/uri-interfaces",
|
||||
"version": "7.7.0",
|
||||
"version": "7.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/uri-interfaces.git",
|
||||
"reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c"
|
||||
"reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/62ccc1a0435e1c54e10ee6022df28d6c04c2946c",
|
||||
"reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c",
|
||||
"url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c5c5cd056110fc8afaba29fa6b72a43ced42acd4",
|
||||
"reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3949,7 +4022,7 @@
|
||||
"ext-gmp": "to improve IPV4 host parsing",
|
||||
"ext-intl": "to handle IDN host with the best performance",
|
||||
"php-64bit": "to improve IPV4 host parsing",
|
||||
"rowbot/url": "to handle WHATWG URL",
|
||||
"rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification",
|
||||
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -3999,7 +4072,7 @@
|
||||
"docs": "https://uri.thephpleague.com",
|
||||
"forum": "https://thephpleague.slack.com",
|
||||
"issues": "https://github.com/thephpleague/uri-src/issues",
|
||||
"source": "https://github.com/thephpleague/uri-interfaces/tree/7.7.0"
|
||||
"source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4007,20 +4080,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-07T16:03:21+00:00"
|
||||
"time": "2026-01-15T06:54:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "livewire/livewire",
|
||||
"version": "v3.7.3",
|
||||
"version": "v3.7.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/livewire/livewire.git",
|
||||
"reference": "a5384df9fbd3eaf02e053bc49aabc8ace293fc1c"
|
||||
"reference": "5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/livewire/livewire/zipball/a5384df9fbd3eaf02e053bc49aabc8ace293fc1c",
|
||||
"reference": "a5384df9fbd3eaf02e053bc49aabc8ace293fc1c",
|
||||
"url": "https://api.github.com/repos/livewire/livewire/zipball/5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0",
|
||||
"reference": "5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4075,7 +4148,7 @@
|
||||
"description": "A front-end framework for Laravel.",
|
||||
"support": {
|
||||
"issues": "https://github.com/livewire/livewire/issues",
|
||||
"source": "https://github.com/livewire/livewire/tree/v3.7.3"
|
||||
"source": "https://github.com/livewire/livewire/tree/v3.7.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4083,7 +4156,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-19T02:00:29+00:00"
|
||||
"time": "2026-01-13T09:37:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
@@ -9418,16 +9491,16 @@
|
||||
},
|
||||
{
|
||||
"name": "ueberdosis/tiptap-php",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ueberdosis/tiptap-php.git",
|
||||
"reference": "458194ad0f8b0cf616fecdf451a84f9a6c1f3056"
|
||||
"reference": "6ea321fa665080e1a72ac5f52dfab19f6a292e2d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ueberdosis/tiptap-php/zipball/458194ad0f8b0cf616fecdf451a84f9a6c1f3056",
|
||||
"reference": "458194ad0f8b0cf616fecdf451a84f9a6c1f3056",
|
||||
"url": "https://api.github.com/repos/ueberdosis/tiptap-php/zipball/6ea321fa665080e1a72ac5f52dfab19f6a292e2d",
|
||||
"reference": "6ea321fa665080e1a72ac5f52dfab19f6a292e2d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9467,7 +9540,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ueberdosis/tiptap-php/issues",
|
||||
"source": "https://github.com/ueberdosis/tiptap-php/tree/2.0.0"
|
||||
"source": "https://github.com/ueberdosis/tiptap-php/tree/2.1.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9483,7 +9556,7 @@
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-26T14:11:46+00:00"
|
||||
"time": "2026-01-10T16:40:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
@@ -9647,16 +9720,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "brianium/paratest",
|
||||
"version": "v7.16.0",
|
||||
"version": "v7.16.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paratestphp/paratest.git",
|
||||
"reference": "a10878ed0fe0bbc2f57c980f7a08065338b970b6"
|
||||
"reference": "f0fdfd8e654e0d38bc2ba756a6cabe7be287390b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/a10878ed0fe0bbc2f57c980f7a08065338b970b6",
|
||||
"reference": "a10878ed0fe0bbc2f57c980f7a08065338b970b6",
|
||||
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/f0fdfd8e654e0d38bc2ba756a6cabe7be287390b",
|
||||
"reference": "f0fdfd8e654e0d38bc2ba756a6cabe7be287390b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9667,10 +9740,10 @@
|
||||
"fidry/cpu-core-counter": "^1.3.0",
|
||||
"jean85/pretty-package-versions": "^2.1.1",
|
||||
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
|
||||
"phpunit/php-code-coverage": "^12.5.1",
|
||||
"phpunit/php-code-coverage": "^12.5.2",
|
||||
"phpunit/php-file-iterator": "^6",
|
||||
"phpunit/php-timer": "^8",
|
||||
"phpunit/phpunit": "^12.5.2",
|
||||
"phpunit/phpunit": "^12.5.4",
|
||||
"sebastian/environment": "^8.0.3",
|
||||
"symfony/console": "^7.3.4 || ^8.0.0",
|
||||
"symfony/process": "^7.3.4 || ^8.0.0"
|
||||
@@ -9682,7 +9755,7 @@
|
||||
"ext-posix": "*",
|
||||
"phpstan/phpstan": "^2.1.33",
|
||||
"phpstan/phpstan-deprecation-rules": "^2.0.3",
|
||||
"phpstan/phpstan-phpunit": "^2.0.10",
|
||||
"phpstan/phpstan-phpunit": "^2.0.11",
|
||||
"phpstan/phpstan-strict-rules": "^2.0.7",
|
||||
"symfony/filesystem": "^7.3.2 || ^8.0.0"
|
||||
},
|
||||
@@ -9724,7 +9797,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/paratestphp/paratest/issues",
|
||||
"source": "https://github.com/paratestphp/paratest/tree/v7.16.0"
|
||||
"source": "https://github.com/paratestphp/paratest/tree/v7.16.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9736,7 +9809,7 @@
|
||||
"type": "paypal"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-09T20:03:26+00:00"
|
||||
"time": "2026-01-08T07:23:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "driftingly/rector-laravel",
|
||||
@@ -9900,7 +9973,7 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/upgrade",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/upgrade.git",
|
||||
@@ -10067,6 +10140,47 @@
|
||||
},
|
||||
"time": "2025-04-30T06:54:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "iamcal/sql-parser",
|
||||
"version": "v0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iamcal/SQLParser.git",
|
||||
"reference": "947083e2dca211a6f12fb1beb67a01e387de9b62"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/iamcal/SQLParser/zipball/947083e2dca211a6f12fb1beb67a01e387de9b62",
|
||||
"reference": "947083e2dca211a6f12fb1beb67a01e387de9b62",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^1.0",
|
||||
"phpunit/phpunit": "^5|^6|^7|^8|^9"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"iamcal\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Cal Henderson",
|
||||
"email": "cal@iamcal.com"
|
||||
}
|
||||
],
|
||||
"description": "MySQL schema parser",
|
||||
"support": {
|
||||
"issues": "https://github.com/iamcal/SQLParser/issues",
|
||||
"source": "https://github.com/iamcal/SQLParser/tree/v0.6"
|
||||
},
|
||||
"time": "2025-03-17T16:59:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jean85/pretty-package-versions",
|
||||
"version": "2.1.1",
|
||||
@@ -10127,6 +10241,96 @@
|
||||
},
|
||||
"time": "2025-03-19T14:43:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "larastan/larastan",
|
||||
"version": "v3.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/larastan/larastan.git",
|
||||
"reference": "82c18890d0d5b012bc39a3432531e5b6cd1b4b3a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/larastan/larastan/zipball/82c18890d0d5b012bc39a3432531e5b6cd1b4b3a",
|
||||
"reference": "82c18890d0d5b012bc39a3432531e5b6cd1b4b3a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"iamcal/sql-parser": "^0.6.0",
|
||||
"illuminate/console": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/container": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/contracts": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/database": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/http": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/pipeline": "^11.44.2 || ^12.4.1",
|
||||
"illuminate/support": "^11.44.2 || ^12.4.1",
|
||||
"php": "^8.2",
|
||||
"phpstan/phpstan": "^2.1.32"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^13",
|
||||
"laravel/framework": "^11.44.2 || ^12.7.2",
|
||||
"mockery/mockery": "^1.6.12",
|
||||
"nikic/php-parser": "^5.4",
|
||||
"orchestra/canvas": "^v9.2.2 || ^10.0.1",
|
||||
"orchestra/testbench-core": "^9.12.0 || ^10.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^2.0.1",
|
||||
"phpunit/phpunit": "^10.5.35 || ^11.5.15"
|
||||
},
|
||||
"suggest": {
|
||||
"orchestra/testbench": "Using Larastan for analysing a package needs Testbench",
|
||||
"phpmyadmin/sql-parser": "Install to enable Larastan's optional phpMyAdmin-based SQL parser automatically"
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon"
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Larastan\\Larastan\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Can Vural",
|
||||
"email": "can9119@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel",
|
||||
"keywords": [
|
||||
"PHPStan",
|
||||
"code analyse",
|
||||
"code analysis",
|
||||
"larastan",
|
||||
"laravel",
|
||||
"package",
|
||||
"php",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/larastan/larastan/issues",
|
||||
"source": "https://github.com/larastan/larastan/tree/v3.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/canvural",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-17T23:00:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.27.0",
|
||||
@@ -11310,16 +11514,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495"
|
||||
"reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495",
|
||||
"reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374",
|
||||
"reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11351,9 +11555,9 @@
|
||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1"
|
||||
},
|
||||
"time": "2025-08-30T15:50:23+00:00"
|
||||
"time": "2026-01-12T11:33:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
@@ -11849,16 +12053,16 @@
|
||||
},
|
||||
{
|
||||
"name": "rector/rector",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rectorphp/rector.git",
|
||||
"reference": "f7166355dcf47482f27be59169b0825995f51c7d"
|
||||
"reference": "9afc1bb43571b25629f353c61a9315b5ef31383a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/f7166355dcf47482f27be59169b0825995f51c7d",
|
||||
"reference": "f7166355dcf47482f27be59169b0825995f51c7d",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/9afc1bb43571b25629f353c61a9315b5ef31383a",
|
||||
"reference": "9afc1bb43571b25629f353c61a9315b5ef31383a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11897,7 +12101,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/rectorphp/rector/issues",
|
||||
"source": "https://github.com/rectorphp/rector/tree/2.3.0"
|
||||
"source": "https://github.com/rectorphp/rector/tree/2.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11905,7 +12109,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-25T22:00:18+00:00"
|
||||
"time": "2026-01-13T15:13:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@@ -13187,16 +13391,16 @@
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-ray",
|
||||
"version": "1.43.2",
|
||||
"version": "1.43.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-ray.git",
|
||||
"reference": "6039c5e62118d7b8febc31546d14a5cf9bb63876"
|
||||
"reference": "4912e37ebb38f40642b6710ba3f598852385e360"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/6039c5e62118d7b8febc31546d14a5cf9bb63876",
|
||||
"reference": "6039c5e62118d7b8febc31546d14a5cf9bb63876",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/4912e37ebb38f40642b6710ba3f598852385e360",
|
||||
"reference": "4912e37ebb38f40642b6710ba3f598852385e360",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -13215,7 +13419,7 @@
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "^7.3",
|
||||
"laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0|^12.0",
|
||||
"laravel/pint": "^1.26",
|
||||
"laravel/pint": "^1.27",
|
||||
"orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
|
||||
"pestphp/pest": "^1.22|^2.0|^3.0|^4.0",
|
||||
"phpstan/phpstan": "^1.10.57|^2.0.2",
|
||||
@@ -13260,7 +13464,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/laravel-ray/issues",
|
||||
"source": "https://github.com/spatie/laravel-ray/tree/1.43.2"
|
||||
"source": "https://github.com/spatie/laravel-ray/tree/1.43.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -13272,7 +13476,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-15T09:06:48+00:00"
|
||||
"time": "2026-01-13T09:04:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/macroable",
|
||||
@@ -14069,7 +14273,7 @@
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.5",
|
||||
"php": "^8.4",
|
||||
"ext-sockets": "*"
|
||||
},
|
||||
"platform-dev": {},
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@ parameters:
|
||||
- database
|
||||
- routes
|
||||
|
||||
level: 5
|
||||
level: max
|
||||
|
||||
excludePaths:
|
||||
- app/Console/Kernel.php
|
||||
@@ -21,6 +21,4 @@ parameters:
|
||||
- '#PHPDoc tag @var#'
|
||||
- '#Unsafe usage of new static#'
|
||||
|
||||
checkMissingIterableValueType: false
|
||||
checkGenericClassInNonGenericObjectType: false
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
|
||||
[2026-01-19 18:47:08] production.ERROR: A void method must not return a value {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): A void method must not return a value at C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/app/Models/User.php:282)
|
||||
[stacktrace]
|
||||
#0 {main}
|
||||
"}
|
||||
[2026-01-19 18:48:05] production.ERROR: Method App\Http\Controllers\Community\PhotosController::__construct() cannot declare a return type {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Method App\\Http\\Controllers\\Community\\PhotosController::__construct() cannot declare a return type at C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/app/Http/Controllers/Community/PhotosController.php:11)
|
||||
[stacktrace]
|
||||
#0 {main}
|
||||
"}
|
||||
[2026-01-19 18:48:43] production.ERROR: Method App\Http\Controllers\Community\Staff\StaffController::__construct() cannot declare a return type {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Method App\\Http\\Controllers\\Community\\Staff\\StaffController::__construct() cannot declare a return type at C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/app/Http/Controllers/Community/Staff/StaffController.php:11)
|
||||
[stacktrace]
|
||||
#0 {main}
|
||||
"}
|
||||
[2026-01-19 18:51:59] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) at phar://C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/vendor/phpstan/phpstan/phpstan.phar/src/File/FileReader.php:16)
|
||||
[stacktrace]
|
||||
#0 {main}
|
||||
"}
|
||||
[2026-01-19 18:51:59] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2441656 bytes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 2441656 bytes) at C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/vendor/larastan/larastan/src/Properties/SquashedMigrationHelper.php:59)
|
||||
[stacktrace]
|
||||
#0 {main}
|
||||
"}
|
||||
[2026-01-19 18:52:14] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 18:52:14] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 18:53:59] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 18:56:28] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:00:21] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:01:32] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:02:40] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:03:23] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:05:17] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:11:01] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:14:07] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:14:24] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:14:25] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:22:43] production.ERROR: RCON connection failed: Het aangevraagde adres is niet geldig in de context van het adres
|
||||
[2026-01-19 19:31:31] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-19 19:34:48] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
[2026-01-19 19:34:48] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
|
||||
Reference in New Issue
Block a user