You've already forked Atomcms-edit
chore: fix code style with Laravel Pint
This commit is contained in:
Regular → Executable
@@ -123,6 +123,7 @@ class CheckMigrationsCommand extends Command
|
|||||||
$this->warn("[Orphaned] {$file->getFilename()} modifies table `{$table}` which no longer exists.");
|
$this->warn("[Orphaned] {$file->getFilename()} modifies table `{$table}` which no longer exists.");
|
||||||
$this->warnings++;
|
$this->warnings++;
|
||||||
$this->addFileToDelete($file->getFilename());
|
$this->addFileToDelete($file->getFilename());
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ use App\Services\RconService;
|
|||||||
use App\Services\SettingsService;
|
use App\Services\SettingsService;
|
||||||
use App\Services\UpdateHistoryService;
|
use App\Services\UpdateHistoryService;
|
||||||
use BackedEnum;
|
use BackedEnum;
|
||||||
use Carbon\Carbon;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Forms\Components\Placeholder;
|
||||||
@@ -31,6 +30,7 @@ use Filament\Notifications\Notification;
|
|||||||
use Filament\Pages\Page;
|
use Filament\Pages\Page;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
@@ -67,7 +67,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
|
|
||||||
public string $catalogSyncUrl = '';
|
public string $catalogSyncUrl = '';
|
||||||
|
|
||||||
/** @var array<\App\Services\Diagnostics\DiagnosticResult> */
|
/** @var array<DiagnosticResult> */
|
||||||
public array $diagnostics = [];
|
public array $diagnostics = [];
|
||||||
|
|
||||||
public function mount(): void
|
public function mount(): void
|
||||||
@@ -421,7 +421,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderServerInfoView(): \Illuminate\Contracts\View\View
|
private function renderServerInfoView(): View
|
||||||
{
|
{
|
||||||
$load = sys_getloadavg();
|
$load = sys_getloadavg();
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderHotelStatusView(): \Illuminate\Contracts\View\View
|
private function renderHotelStatusView(): View
|
||||||
{
|
{
|
||||||
$serviceName = $this->getSetting('emulator_service_name', 'emulator');
|
$serviceName = $this->getSetting('emulator_service_name', 'emulator');
|
||||||
$serviceStatus = $this->runCommand('systemctl is-active ' . escapeshellarg($serviceName) . ' 2>/dev/null') ?: 'inactive';
|
$serviceStatus = $this->runCommand('systemctl is-active ' . escapeshellarg($serviceName) . ' 2>/dev/null') ?: 'inactive';
|
||||||
@@ -479,7 +479,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderEmulatorInfoView(): \Illuminate\Contracts\View\View
|
private function renderEmulatorInfoView(): View
|
||||||
{
|
{
|
||||||
$status = $this->getEmulatorStatusText();
|
$status = $this->getEmulatorStatusText();
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderEmulatorSettingsView(): \Illuminate\Contracts\View\View
|
private function renderEmulatorSettingsView(): View
|
||||||
{
|
{
|
||||||
return view('filament.components.commandocentrum.emulator-settings', [
|
return view('filament.components.commandocentrum.emulator-settings', [
|
||||||
'emulatorBranchesHtml' => $this->getEmulatorBranchesHtml(),
|
'emulatorBranchesHtml' => $this->getEmulatorBranchesHtml(),
|
||||||
@@ -499,7 +499,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderEmulatorStatusView(): \Illuminate\Contracts\View\View
|
private function renderEmulatorStatusView(): View
|
||||||
{
|
{
|
||||||
$serviceName = $this->getSetting('emulator_service_name', 'arcturus');
|
$serviceName = $this->getSetting('emulator_service_name', 'arcturus');
|
||||||
$jarPath = $this->getSetting('emulator_jar_path', '/var/www/Emulator');
|
$jarPath = $this->getSetting('emulator_jar_path', '/var/www/Emulator');
|
||||||
@@ -540,7 +540,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderNitroSettingsView(): \Illuminate\Contracts\View\View
|
private function renderNitroSettingsView(): View
|
||||||
{
|
{
|
||||||
return view('filament.components.commandocentrum.nitro-settings', [
|
return view('filament.components.commandocentrum.nitro-settings', [
|
||||||
'nitroBranchesHtml' => $this->getNitroBranchesHtml(),
|
'nitroBranchesHtml' => $this->getNitroBranchesHtml(),
|
||||||
@@ -548,7 +548,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderNitroStatusView(): \Illuminate\Contracts\View\View
|
private function renderNitroStatusView(): View
|
||||||
{
|
{
|
||||||
$clientPath = $this->getSetting('nitro_client_path', '/var/www/nitro-client');
|
$clientPath = $this->getSetting('nitro_client_path', '/var/www/nitro-client');
|
||||||
$rendererPath = $this->getSetting('nitro_renderer_path', '/var/www/nitro-renderer');
|
$rendererPath = $this->getSetting('nitro_renderer_path', '/var/www/nitro-renderer');
|
||||||
@@ -572,7 +572,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderBackupsListView(): \Illuminate\Contracts\View\View
|
private function renderBackupsListView(): View
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$backups = app(EmulatorControlAction::class)->getBackups();
|
$backups = app(EmulatorControlAction::class)->getBackups();
|
||||||
@@ -585,7 +585,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderClothingStatusView(): \Illuminate\Contracts\View\View
|
private function renderClothingStatusView(): View
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$count = DB::table('catalog_clothing')->count();
|
$count = DB::table('catalog_clothing')->count();
|
||||||
@@ -598,7 +598,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderStaffActivityView(): \Illuminate\Contracts\View\View
|
private function renderStaffActivityView(): View
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$activities = StaffActivity::with('user:id,username,look')
|
$activities = StaffActivity::with('user:id,username,look')
|
||||||
@@ -614,7 +614,7 @@ final class Commandocentrum extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderUpdateHistoryView(): \Illuminate\Contracts\View\View
|
private function renderUpdateHistoryView(): View
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$history = app(UpdateHistoryService::class)->getRecent(10);
|
$history = app(UpdateHistoryService::class)->getRecent(10);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ use App\Models\Articles\WebsiteArticle;
|
|||||||
use App\Models\Miscellaneous\CameraWeb;
|
use App\Models\Miscellaneous\CameraWeb;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
@@ -70,12 +71,12 @@ class AuthController extends Controller
|
|||||||
], 201);
|
], 201);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user(\Illuminate\Http\Request $request): JsonResponse
|
public function user(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
return response()->json(new UserApiResource($request->user()));
|
return response()->json(new UserApiResource($request->user()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout(\Illuminate\Http\Request $request): JsonResponse
|
public function logout(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
$request->user()->currentAccessToken()->delete();
|
$request->user()->currentAccessToken()->delete();
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ class FurniEditorController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<string, mixed> $data
|
* @param array<string, mixed> $data
|
||||||
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
private function buildUpdateData(array $data): array
|
private function buildUpdateData(array $data): array
|
||||||
@@ -323,6 +324,7 @@ class FurniEditorController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<string, mixed> $data
|
* @param array<string, mixed> $data
|
||||||
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
private function buildInsertData(array $data): array
|
private function buildInsertData(array $data): array
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ use App\Http\Resources\Api\HelpTicketResource;
|
|||||||
use App\Http\Resources\Api\LeaderboardUserResource;
|
use App\Http\Resources\Api\LeaderboardUserResource;
|
||||||
use App\Http\Resources\Api\PhotoResource;
|
use App\Http\Resources\Api\PhotoResource;
|
||||||
use App\Http\Resources\Api\ShopPackageResource;
|
use App\Http\Resources\Api\ShopPackageResource;
|
||||||
use App\Http\Resources\Api\UserApiResource;
|
|
||||||
use App\Http\Resources\Api\UserBriefResource;
|
|
||||||
use App\Models\Articles\WebsiteArticle;
|
use App\Models\Articles\WebsiteArticle;
|
||||||
use App\Models\Game\Furniture\CatalogItem;
|
use App\Models\Game\Furniture\CatalogItem;
|
||||||
use App\Models\Game\Furniture\CatalogPage;
|
use App\Models\Game\Furniture\CatalogPage;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use App\Models\Game\Player\UserCurrency;
|
|||||||
use App\Models\Game\Player\UserSetting;
|
use App\Models\Game\Player\UserSetting;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Services\Community\StaffService;
|
use App\Services\Community\StaffService;
|
||||||
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ class LeaderboardController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function retrieveSettings(string $column): \Illuminate\Database\Eloquent\Collection
|
private function retrieveSettings(string $column): Collection
|
||||||
{
|
{
|
||||||
return UserSetting::query()
|
return UserSetting::query()
|
||||||
->select(['user_id', $column])
|
->select(['user_id', $column])
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ class RadioController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<RadioSettings> $keys
|
* @param array<RadioSettings> $keys
|
||||||
|
*
|
||||||
* @return array<string|null>
|
* @return array<string|null>
|
||||||
*/
|
*/
|
||||||
private function getSettings(array $keys): array
|
private function getSettings(array $keys): array
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Shop;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\AccountTopupFormRequest;
|
use App\Http\Requests\AccountTopupFormRequest;
|
||||||
use App\Models\Shop\WebsitePaypalTransaction;
|
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class WebsiteRareValue extends Model
|
class WebsiteRareValue extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
class WebsiteRareValueCategory extends Model
|
class WebsiteRareValueCategory extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class WebsiteStaffApplications extends Model
|
class WebsiteStaffApplications extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $table = 'website_staff_applications';
|
protected $table = 'website_staff_applications';
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
class WebsiteTeam extends Model
|
class WebsiteTeam extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $table = 'website_teams';
|
protected $table = 'website_teams';
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class UserBadge extends Model
|
class UserBadge extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $table = 'users_badges';
|
protected $table = 'users_badges';
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class UserCurrency extends Model
|
class UserCurrency extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['user_id', 'type'];
|
protected $guarded = ['user_id', 'type'];
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class WebsiteHelpCenterCategory extends Model
|
class WebsiteHelpCenterCategory extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'name', 'icon'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'name', 'icon'];
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class WebsiteHelpCenterQuestion extends Model
|
class WebsiteHelpCenterQuestion extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $table = 'help_questions';
|
protected $table = 'help_questions';
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ use Stevebauman\Purify\Facades\Purify;
|
|||||||
class WebsiteHelpCenterTicketReply extends Model
|
class WebsiteHelpCenterTicketReply extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'ticket_id', 'content'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'ticket_id', 'content'];
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class WebsiteRule extends Model
|
class WebsiteRule extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'category_id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'category_id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
class WebsiteRuleCategory extends Model
|
class WebsiteRuleCategory extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class WebsiteShopArticleFeature extends Model
|
class WebsiteShopArticleFeature extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'article_id', 'feature'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'article_id', 'feature'];
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class WebsiteShopVoucher extends Model
|
class WebsiteShopVoucher extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'code', 'amount', 'max_uses', 'expires_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'code', 'amount', 'max_uses', 'expires_at'];
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
class WebsiteUsedShopVoucher extends Model
|
class WebsiteUsedShopVoucher extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'voucher_id'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'voucher_id'];
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class Referral extends Model
|
class Referral extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'referrer_id'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'referrer_id'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
class WebsiteUserGuestbook extends Model
|
class WebsiteUserGuestbook extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
#[\Override]
|
#[\Override]
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'profile_id'];
|
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'profile_id'];
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Services\Community;
|
|||||||
|
|
||||||
use App\Models\RadioSchedule;
|
use App\Models\RadioSchedule;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
|
||||||
class RadioScheduleService
|
class RadioScheduleService
|
||||||
@@ -53,7 +54,7 @@ class RadioScheduleService
|
|||||||
->get());
|
->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFullSchedule(): \Illuminate\Support\Collection
|
public function getFullSchedule(): Collection
|
||||||
{
|
{
|
||||||
return Cache::remember('radio_schedule_all', 300, fn () => RadioSchedule::with('user:id,username,look')
|
return Cache::remember('radio_schedule_all', 300, fn () => RadioSchedule::with('user:id,username,look')
|
||||||
->active()
|
->active()
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class DatabaseDiagnostic
|
|||||||
return DiagnosticResult::error(
|
return DiagnosticResult::error(
|
||||||
'Required Tables',
|
'Required Tables',
|
||||||
'Missing: ' . implode(', ', $missing),
|
'Missing: ' . implode(', ', $missing),
|
||||||
'Run: php artisan migrate'
|
'Run: php artisan migrate',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class DatabaseDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'Radio Tables',
|
'Radio Tables',
|
||||||
'Missing: ' . implode(', ', $missing),
|
'Missing: ' . implode(', ', $missing),
|
||||||
'Run radio migration seeder'
|
'Run radio migration seeder',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ class DiagnosticRunner
|
|||||||
$this->results = [];
|
$this->results = [];
|
||||||
|
|
||||||
$diagnostics = [
|
$diagnostics = [
|
||||||
new DatabaseDiagnostic(),
|
new DatabaseDiagnostic,
|
||||||
new SecurityDiagnostic(),
|
new SecurityDiagnostic,
|
||||||
new SystemDiagnostic(),
|
new SystemDiagnostic,
|
||||||
new HttpDiagnostic(),
|
new HttpDiagnostic,
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($diagnostics as $diagnostic) {
|
foreach ($diagnostics as $diagnostic) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class HttpDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'App URL',
|
'App URL',
|
||||||
'APP_URL not configured properly',
|
'APP_URL not configured properly',
|
||||||
'Set APP_URL in .env to your domain'
|
'Set APP_URL in .env to your domain',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ class HttpDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'App URL',
|
'App URL',
|
||||||
'Not using HTTPS in production',
|
'Not using HTTPS in production',
|
||||||
'Configure SSL and update APP_URL'
|
'Configure SSL and update APP_URL',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ class HttpDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'HTTP Redirect',
|
'HTTP Redirect',
|
||||||
"HTTP returns {$response->status()} instead of redirect",
|
"HTTP returns {$response->status()} instead of redirect",
|
||||||
'Configure web server to redirect HTTP to HTTPS'
|
'Configure web server to redirect HTTP to HTTPS',
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return DiagnosticResult::warning('HTTP Redirect', 'Could not test: ' . $e->getMessage());
|
return DiagnosticResult::warning('HTTP Redirect', 'Could not test: ' . $e->getMessage());
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class SecurityDiagnostic
|
|||||||
return DiagnosticResult::error(
|
return DiagnosticResult::error(
|
||||||
'Debug Mode',
|
'Debug Mode',
|
||||||
'Debug mode is enabled in production',
|
'Debug mode is enabled in production',
|
||||||
'Set APP_DEBUG=false in .env'
|
'Set APP_DEBUG=false in .env',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class SecurityDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'.env File',
|
'.env File',
|
||||||
'File appears to be on a single line',
|
'File appears to be on a single line',
|
||||||
'Ensure .env has proper line breaks'
|
'Ensure .env has proper line breaks',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ class SecurityDiagnostic
|
|||||||
return DiagnosticResult::error(
|
return DiagnosticResult::error(
|
||||||
'File Permissions',
|
'File Permissions',
|
||||||
'Not writable: ' . implode(', ', $issues),
|
'Not writable: ' . implode(', ', $issues),
|
||||||
'Run: chmod -R 775 storage bootstrap/cache'
|
'Run: chmod -R 775 storage bootstrap/cache',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class SystemDiagnostic
|
|||||||
return DiagnosticResult::error(
|
return DiagnosticResult::error(
|
||||||
'PHP Extensions',
|
'PHP Extensions',
|
||||||
'Missing: ' . implode(', ', $missing),
|
'Missing: ' . implode(', ', $missing),
|
||||||
'Install: sudo apt install php-' . implode(' php-', $missing)
|
'Install: sudo apt install php-' . implode(' php-', $missing),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ class SystemDiagnostic
|
|||||||
return DiagnosticResult::error(
|
return DiagnosticResult::error(
|
||||||
'PHP Version',
|
'PHP Version',
|
||||||
'Current: ' . PHP_VERSION . ' (minimum: 8.1)',
|
'Current: ' . PHP_VERSION . ' (minimum: 8.1)',
|
||||||
'Upgrade PHP to 8.1 or higher'
|
'Upgrade PHP to 8.1 or higher',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ class SystemDiagnostic
|
|||||||
return DiagnosticResult::warning(
|
return DiagnosticResult::warning(
|
||||||
'Session',
|
'Session',
|
||||||
'Using file sessions in production',
|
'Using file sessions in production',
|
||||||
'Consider using redis or database sessions'
|
'Consider using redis or database sessions',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Services\Emulator;
|
namespace App\Services\Emulator;
|
||||||
|
|
||||||
use App\Services\Emulator\EmulatorSqlService;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Process;
|
use Illuminate\Support\Facades\Process;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Services\Emulator;
|
namespace App\Services\Emulator;
|
||||||
|
|
||||||
use App\Services\Emulator\EmulatorSourceService;
|
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Process;
|
use Illuminate\Support\Facades\Process;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
|
use App\Models\Miscellaneous\WebsiteSetting;
|
||||||
use App\Services\Emulator\EmulatorBackupService;
|
use App\Services\Emulator\EmulatorBackupService;
|
||||||
use App\Services\Emulator\EmulatorBuildService;
|
use App\Services\Emulator\EmulatorBuildService;
|
||||||
use App\Services\Emulator\EmulatorJarService;
|
use App\Services\Emulator\EmulatorJarService;
|
||||||
@@ -17,11 +18,17 @@ use Illuminate\Support\Facades\Process;
|
|||||||
class EmulatorUpdateService
|
class EmulatorUpdateService
|
||||||
{
|
{
|
||||||
private readonly EmulatorStatusService $statusService;
|
private readonly EmulatorStatusService $statusService;
|
||||||
|
|
||||||
private readonly EmulatorJarService $jarService;
|
private readonly EmulatorJarService $jarService;
|
||||||
|
|
||||||
private readonly EmulatorSourceService $sourceService;
|
private readonly EmulatorSourceService $sourceService;
|
||||||
|
|
||||||
private readonly EmulatorBuildService $buildService;
|
private readonly EmulatorBuildService $buildService;
|
||||||
|
|
||||||
private readonly EmulatorSqlService $sqlService;
|
private readonly EmulatorSqlService $sqlService;
|
||||||
|
|
||||||
private readonly EmulatorBackupService $backupService;
|
private readonly EmulatorBackupService $backupService;
|
||||||
|
|
||||||
private readonly SettingsService $settings;
|
private readonly SettingsService $settings;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -217,9 +224,9 @@ class EmulatorUpdateService
|
|||||||
|
|
||||||
public function resetInstalledDate(): void
|
public function resetInstalledDate(): void
|
||||||
{
|
{
|
||||||
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_jar_installed_date')->delete();
|
WebsiteSetting::where('key', 'emulator_jar_installed_date')->delete();
|
||||||
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_source_commit')->delete();
|
WebsiteSetting::where('key', 'emulator_source_commit')->delete();
|
||||||
\App\Models\Miscellaneous\WebsiteSetting::where('key', 'emulator_source_date')->delete();
|
WebsiteSetting::where('key', 'emulator_source_date')->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearAllLogs(): array
|
public function clearAllLogs(): array
|
||||||
|
|||||||
Regular → Executable
Regular → Executable
Regular → Executable
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Actions\Fortify\Controllers\TwoFactorAuthenticatedSessionController;
|
||||||
use App\Http\Controllers\Auth\EmailVerificationController;
|
use App\Http\Controllers\Auth\EmailVerificationController;
|
||||||
use App\Http\Controllers\Auth\SocialAuthController;
|
use App\Http\Controllers\Auth\SocialAuthController;
|
||||||
use App\Http\Controllers\Auth\TwoFactorChallengeController;
|
use App\Http\Controllers\Auth\TwoFactorChallengeController;
|
||||||
|
use App\Http\Controllers\User\ForgotPasswordController;
|
||||||
|
use App\Http\Controllers\User\UserReferralController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Laravel\Fortify\Features;
|
use Laravel\Fortify\Features;
|
||||||
use Laravel\Fortify\Http\Controllers\RegisteredUserController;
|
use Laravel\Fortify\Http\Controllers\RegisteredUserController;
|
||||||
use App\Actions\Fortify\Controllers\TwoFactorAuthenticatedSessionController;
|
|
||||||
use App\Http\Controllers\User\ForgotPasswordController;
|
|
||||||
use App\Http\Controllers\User\UserReferralController;
|
|
||||||
|
|
||||||
// Social Login routes
|
// Social Login routes
|
||||||
Route::prefix('auth')->group(function () {
|
Route::prefix('auth')->group(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user