dstpabuaran.com/app/Http/Requests/Admin/Settings/UpdateSystemRequest.php
Yoga Pangestu a1a73cb222 Add admin settings routes and corresponding feature tests
- Introduced routes for managing admin settings including system, homepage, social media, marketplace, and HR settings.
- Created a comprehensive test suite for the AdminSettingsController to ensure proper functionality and validation of settings updates.
- Implemented tests for authentication, data integrity, and realistic user scenarios to validate the settings management process.
2026-07-31 01:04:14 +07:00

36 lines
870 B
PHP

<?php
namespace App\Http\Requests\Admin\Settings;
use Illuminate\Foundation\Http\FormRequest;
class UpdateSystemRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'app_name' => ['required', 'string', 'max:255'],
'about_app' => ['nullable', 'string', 'max:2000'],
'address' => ['nullable', 'string', 'max:500'],
'email' => ['nullable', 'email', 'max:255'],
'phone' => ['nullable', 'string', 'max:20'],
];
}
public function attributes(): array
{
return [
'app_name' => 'nama aplikasi',
'about_app' => 'tentang aplikasi',
'address' => 'alamat',
'email' => 'email',
'phone' => 'nomor telepon',
];
}
}