Deploy Ladill Servers / deploy (push) Successful in 29s
Add shared btn-primary components and plus icons on create/new actions for a consistent Ladill UI. Co-authored-by: Cursor <cursoragent@cursor.com>
92 lines
7.2 KiB
PHP
92 lines
7.2 KiB
PHP
<x-hosting-panel-layout :account="$account">
|
|
<x-slot name="title">PHP Settings - {{ $account->username }}</x-slot>
|
|
<x-slot name="header">PHP Settings</x-slot>
|
|
|
|
<div class="space-y-6">
|
|
@if(session('success'))
|
|
<div class="rounded-lg bg-emerald-50 border border-emerald-200 p-4">
|
|
<p class="text-sm text-emerald-800">{{ session('success') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
@if(session('error'))
|
|
<div class="rounded-lg bg-red-50 border border-red-200 p-4">
|
|
<p class="text-sm text-red-800">{{ session('error') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6">
|
|
<h3 class="text-base font-semibold text-slate-900 mb-4">PHP Version</h3>
|
|
<p class="text-sm text-slate-600 mb-4">Select the PHP version for your hosting account. This will apply to all your domains.</p>
|
|
<form action="{{ route('hosting.panel.php.version', $account) }}" method="POST" class="space-y-4">
|
|
@csrf
|
|
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3">
|
|
@foreach($availableVersions as $version)
|
|
<label for="php_version_{{ str_replace('.', '_', $version) }}" class="relative flex cursor-pointer rounded-lg border p-4 focus:outline-none {{ $currentVersion === $version ? 'border-indigo-600 bg-indigo-50 ring-2 ring-indigo-600' : 'border-slate-200 bg-white hover:bg-slate-50' }}">
|
|
<input id="php_version_{{ str_replace('.', '_', $version) }}" type="radio" name="php_version" value="{{ $version }}" class="mt-1 h-4 w-4 border-slate-300 text-indigo-600 focus:ring-indigo-500" {{ $currentVersion === $version ? 'checked' : '' }}>
|
|
<div class="ml-3 flex w-full flex-col items-center">
|
|
<svg class="h-8 w-8 {{ $currentVersion === $version ? 'text-indigo-600' : 'text-slate-400' }}" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
|
|
</svg>
|
|
<span class="mt-2 text-sm font-semibold {{ $currentVersion === $version ? 'text-indigo-900' : 'text-slate-700' }}">PHP {{ $version }}</span>
|
|
@if($currentVersion === $version)
|
|
<span class="mt-1 text-xs text-indigo-600">Current</span>
|
|
@endif
|
|
</div>
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
<button type="submit" class="btn-primary">
|
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
|
|
Change PHP Version
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6">
|
|
<h3 class="text-base font-semibold text-slate-900 mb-4">PHP Configuration</h3>
|
|
<p class="text-sm text-slate-600 mb-4">Customize PHP settings for your hosting account. These settings are saved to your .user.ini file.</p>
|
|
<form action="{{ route('hosting.panel.php.settings', $account) }}" method="POST" class="space-y-6">
|
|
@csrf
|
|
<div class="grid gap-6 sm:grid-cols-2">
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 mb-1">Upload Max Filesize (MB)</label>
|
|
<input type="number" name="upload_max_filesize" value="{{ $phpSettings['upload_max_filesize'] }}" min="1" max="512" class="w-full rounded-lg border border-slate-200 px-4 py-2.5 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
|
<p class="mt-1 text-xs text-slate-500">Maximum size for file uploads (1-512 MB)</p>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 mb-1">Post Max Size (MB)</label>
|
|
<input type="number" name="post_max_size" value="{{ $phpSettings['post_max_size'] }}" min="1" max="512" class="w-full rounded-lg border border-slate-200 px-4 py-2.5 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
|
<p class="mt-1 text-xs text-slate-500">Maximum size for POST data (1-512 MB)</p>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 mb-1">Memory Limit (MB)</label>
|
|
<input type="number" name="memory_limit" value="{{ $phpSettings['memory_limit'] }}" min="32" max="1024" class="w-full rounded-lg border border-slate-200 px-4 py-2.5 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
|
<p class="mt-1 text-xs text-slate-500">Maximum memory per script (32-1024 MB)</p>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 mb-1">Max Execution Time (seconds)</label>
|
|
<input type="number" name="max_execution_time" value="{{ $phpSettings['max_execution_time'] }}" min="30" max="600" class="w-full rounded-lg border border-slate-200 px-4 py-2.5 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
|
<p class="mt-1 text-xs text-slate-500">Maximum script execution time (30-600 seconds)</p>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 mb-1">Max Input Variables</label>
|
|
<input type="number" name="max_input_vars" value="{{ $phpSettings['max_input_vars'] }}" min="1000" max="10000" class="w-full rounded-lg border border-slate-200 px-4 py-2.5 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
|
<p class="mt-1 text-xs text-slate-500">Maximum number of input variables (1000-10000)</p>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn-primary">
|
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
|
|
Save PHP Settings
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="rounded-xl border border-amber-200 bg-amber-50 p-6">
|
|
<h3 class="text-base font-semibold text-amber-900 mb-2">Custom php.ini</h3>
|
|
<p class="text-sm text-amber-800 mb-2">You can also edit your .user.ini file directly via the File Manager for additional PHP settings.</p>
|
|
<p class="text-sm text-amber-800">Location: <code class="bg-amber-100 px-1.5 py-0.5 rounded text-xs font-mono">/public_html/.user.ini</code></p>
|
|
</div>
|
|
</div>
|
|
</x-hosting-panel-layout>
|