- 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.
32 lines
698 B
PHP
32 lines
698 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Settings;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateSocialMediaRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'instagram_url' => ['nullable', 'string', 'max:500'],
|
|
'facebook_url' => ['nullable', 'string', 'max:500'],
|
|
'tiktok_url' => ['nullable', 'string', 'max:500'],
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'instagram_url' => 'instagram',
|
|
'facebook_url' => 'facebook',
|
|
'tiktok_url' => 'tiktok',
|
|
];
|
|
}
|
|
}
|