app/Http/Requests/BusinessRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'avatar' => ['required'],
            'name' => ['required'],
            'npwp' => ['required'],
            'website' => ['required'],
            'phone' => ['required'],
            'address' => ['required'],
            'social_media' => ['present' , 'array' , 'min:1'],
            'social_media.*.platform' => ['required'],
            'social_media.*.link' => ['required'],
        ];
    }
public function rules ( ) { return [ 'avatar' => [ 'required' ] , 'name' => [ 'required' ] , 'npwp' => [ 'required' ] , 'website' => [ 'required' ] , 'phone' => [ 'required' ] , 'address' => [ 'required' ] , 'social_media' => [ 'present' , 'array' , 'min:1' ] , 'social_media.*.platform' => [ 'required' ] , 'social_media.*.link' => [ 'required' ] , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .