mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-05 20:19:39 +00:00
- Optimize Blade JavaScript code. - Refactored multiple admin controllers for improved validation, error handling, and query efficiency. - Added ProxyConfig trait to centralize proxy configuration options. - Updated NodeStatusDetection to use model relationships for heartbeat checks. - Improved category, label, and country management logic and error logging. - Added new Blade components for admin UI and updated language files and assets for better localization and frontend support. - Bug fixed & introduced more bug :)
40 lines
868 B
PHP
40 lines
868 B
PHP
@props([
|
|
'style' => 'horizontal',
|
|
'route' => null,
|
|
'method' => 'POST',
|
|
'model' => null,
|
|
'handler' => null,
|
|
'enctype' => false,
|
|
])
|
|
|
|
@php
|
|
$formAttributes = ['class' => 'form-' . e($style)];
|
|
if ($route) {
|
|
$formAttributes['action'] = e($route);
|
|
}
|
|
$formAttributes['method'] = $method === 'GET' ? 'GET' : 'POST';
|
|
if ($handler) {
|
|
$formAttributes['onsubmit'] = 'return ' . e($handler);
|
|
}
|
|
if ($enctype) {
|
|
$formAttributes['enctype'] = 'multipart/form-data';
|
|
}
|
|
@endphp
|
|
|
|
<form {!! implode(
|
|
' ',
|
|
array_map(
|
|
function ($key, $value) {
|
|
return $key . '="' . $value . '"';
|
|
},
|
|
array_keys($formAttributes),
|
|
$formAttributes,
|
|
),
|
|
) !!}>
|
|
@if (!in_array($method, ['GET', 'POST']))
|
|
@method($method)
|
|
@endif
|
|
@csrf
|
|
{!! $slot !!}
|
|
</form>
|