App\Http\Requests\SettingRequest Class Reference
Inheritance diagram for App\Http\Requests\SettingRequest:
App\Http\Requests\Request

Public Member Functions

 authorize ()
 Determine if the user is authorized to make this request. More...
 
 rules ()
 Get the validation rules that apply to the request. More...
 
 response (array $errors)
 

Protected Attributes

 $rules = []
 

Detailed Description

Definition at line 7 of file SettingRequest.php.

Member Function Documentation

App\Http\Requests\SettingRequest::authorize ( )

Determine if the user is authorized to make this request.

Returns
bool

Definition at line 14 of file SettingRequest.php.

15  {
16  return true;
17  }
App\Http\Requests\SettingRequest::response ( array  $errors)

Definition at line 60 of file SettingRequest.php.

61  {
62  return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag);
63  }
App\Http\Requests\SettingRequest::rules ( )

Get the validation rules that apply to the request.

Returns
array

Definition at line 24 of file SettingRequest.php.

25  {
26  return [
27  "brand" => 'required|min:1|numeric',
28  "qr_text" => 'min:1|max:31',
29  "logo_img" => 'mimes:jpeg,bmp,png,gif',
30  "custom_css" => 'string',
31  "alert_email" => 'email_array',
32  "slack_endpoint" => 'url',
33  "default_currency" => 'required',
34  "locale" => 'required',
35  "slack_channel" => 'regex:/(?<!\w)#\w+/',
36  "slack_botname" => 'string',
37  'labels_per_page' => 'numeric',
38  'labels_width' => 'numeric',
39  'labels_height' => 'numeric',
40  'labels_pmargin_left' => 'numeric',
41  'labels_pmargin_right' => 'numeric',
42  'labels_pmargin_top' => 'numeric',
43  'labels_pmargin_bottom' => 'numeric',
44  'labels_display_bgutter' => 'numeric',
45  'labels_display_sgutter' => 'numeric',
46  'labels_fontsize' => 'numeric|min:5',
47  'labels_pagewidth' => 'numeric',
48  'labels_pageheight' => 'numeric',
49  "ldap_server" => 'sometimes|required_if:ldap_enabled,1|url',
50  "ldap_uname" => 'sometimes|required_if:ldap_enabled,1',
51  "ldap_basedn" => 'sometimes|required_if:ldap_enabled,1',
52  "ldap_filter" => 'sometimes|required_if:ldap_enabled,1',
53  "ldap_username_field" => 'sometimes|required_if:ldap_enabled,1',
54  "ldap_lname_field" => 'sometimes|required_if:ldap_enabled,1',
55  "ldap_auth_filter_query" => 'sometimes|required_if:ldap_enabled,1',
56  "ldap_version" => 'sometimes|required_if:ldap_enabled,1',
57  ];
58  }

Member Data Documentation

App\Http\Requests\Request::$rules = []
protectedinherited

Definition at line 9 of file Request.php.


The documentation for this class was generated from the following file: