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