My first commit of codes
This commit is contained in:
40
app/Http/Requests/AgentRequest.php
Normal file
40
app/Http/Requests/AgentRequest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class AgentRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'user_name' => 'required|unique:agents',
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'email' => 'required',
|
||||
'account_type' => 'required',
|
||||
'account_status' => 'required',
|
||||
'assign_group' => 'required',
|
||||
'primary_dpt' => 'required',
|
||||
'agent_tzone' => 'required',
|
||||
'phone_number' => 'phone:IN',
|
||||
'mobile' => 'phone:IN',
|
||||
'team_id' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
39
app/Http/Requests/AgentUpdate.php
Normal file
39
app/Http/Requests/AgentUpdate.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class AgentUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'email' => 'required|email',
|
||||
'account_type' => 'required',
|
||||
'role' => 'required',
|
||||
'assign_group' => 'required',
|
||||
'primary_dpt' => 'required',
|
||||
'agent_tzone' => 'required',
|
||||
'phone_number' => 'phone:IN',
|
||||
'mobile' => 'phone:IN',
|
||||
'team_id' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
28
app/Http/Requests/BanRequest.php
Normal file
28
app/Http/Requests/BanRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class BanRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
'email_address' => 'required|email|unique:banlist',
|
||||
'ban_status' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/BanlistRequest.php
Normal file
30
app/Http/Requests/BanlistRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class BanlistRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email_address' => 'email',
|
||||
'ban_status' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/CheckTicket.php
Normal file
30
app/Http/Requests/CheckTicket.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class CheckTicket extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'ticket_number'=>'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/CompanyRequest.php
Normal file
32
app/Http/Requests/CompanyRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class CompanyRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'company_name' => 'required',
|
||||
'website' => 'url',
|
||||
'phone' => 'numeric',
|
||||
'logo' => 'image'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
37
app/Http/Requests/CreateTicketRequest.php
Normal file
37
app/Http/Requests/CreateTicketRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class CreateTicketRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'email' => 'required|email',
|
||||
'fullname' => 'required|min:3',
|
||||
'helptopic' => 'required',
|
||||
'dept' => 'required',
|
||||
'sla' => 'required',
|
||||
'subject' => 'required|min:5',
|
||||
'body' => 'required|min:20',
|
||||
'priority' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/DepartmentRequest.php
Normal file
32
app/Http/Requests/DepartmentRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class DepartmentRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|unique:department',
|
||||
'outgoing_email' => 'required',
|
||||
'auto_response_email' => 'required',
|
||||
'group_id' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/DepartmentUpdate.php
Normal file
32
app/Http/Requests/DepartmentUpdate.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class DepartmentUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'outgoing_email' => 'required',
|
||||
'auto_response_email' => 'required',
|
||||
'group_id' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/DiagnoRequest.php
Normal file
32
app/Http/Requests/DiagnoRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class DiagnoRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'from' => 'required|email',
|
||||
'to' => 'required|email',
|
||||
'subject' => 'required',
|
||||
'message' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
35
app/Http/Requests/EmailRequest.php
Normal file
35
app/Http/Requests/EmailRequest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class EmailRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
39
app/Http/Requests/EmailsEditRequest.php
Normal file
39
app/Http/Requests/EmailsEditRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class EmailsEditRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email_address' => 'email',
|
||||
'email_name' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'help_topic' => 'required',
|
||||
'imap_config' => 'required',
|
||||
'password' => 'required|min:6',
|
||||
'user_name' => 'required',
|
||||
'sending_host' => 'required',
|
||||
'sending_port' => 'required'
|
||||
//'mailbox_protocol' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
39
app/Http/Requests/EmailsRequest.php
Normal file
39
app/Http/Requests/EmailsRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class EmailsRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email_address' => 'required|email|unique:emails',
|
||||
'email_name' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'help_topic' => 'required',
|
||||
'imap_config' => 'required',
|
||||
'password' => 'required|min:6',
|
||||
'user_name' => 'required',
|
||||
'sending_host' => 'required',
|
||||
'sending_port' => 'required'
|
||||
//'mailbox_protocol' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
34
app/Http/Requests/FormRequest.php
Normal file
34
app/Http/Requests/FormRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class FormRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'title' => 'required',
|
||||
'label' => 'required',
|
||||
'type' => 'required',
|
||||
'visibility' => 'required'
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/GroupRequest.php
Normal file
30
app/Http/Requests/GroupRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
|
||||
class GroupRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|unique:groups'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
36
app/Http/Requests/HelptopicRequest.php
Normal file
36
app/Http/Requests/HelptopicRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class HelptopicRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'topic' => 'required|unique:help_topic',
|
||||
|
||||
'parent_topic' => 'required',
|
||||
'custom_form' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'sla_plan' => 'required',
|
||||
'auto_assign' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
34
app/Http/Requests/HelptopicUpdate.php
Normal file
34
app/Http/Requests/HelptopicUpdate.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class HelptopicUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'parent_topic' => 'required',
|
||||
'custom_form' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'sla_plan' => 'required',
|
||||
'auto_assign' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/LoginRequest.php
Normal file
30
app/Http/Requests/LoginRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class LoginRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|min:6'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/OrganizationRequest.php
Normal file
32
app/Http/Requests/OrganizationRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class OrganizationRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'name' => 'required|unique:organization',
|
||||
'website' => 'url',
|
||||
'phone' => 'size:10'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
31
app/Http/Requests/OrganizationUpdate.php
Normal file
31
app/Http/Requests/OrganizationUpdate.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class OrganizationUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'website' => 'url',
|
||||
'phone' => 'size:10'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
31
app/Http/Requests/ProfilePassword.php
Normal file
31
app/Http/Requests/ProfilePassword.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class ProfilePassword extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'old_password' => 'required',
|
||||
'new_password' => 'required|min:6',
|
||||
'confirm_password' => 'required|same:new_password'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/ProfileRequest.php
Normal file
30
app/Http/Requests/ProfileRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class ProfileRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'first_name' => 'required',
|
||||
'profile_pic' => 'mimes:png,jpeg',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/RegisterRequest.php
Normal file
32
app/Http/Requests/RegisterRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class RegisterRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|max:50|email|unique:users',
|
||||
'full_name' => 'required',
|
||||
'password' => 'required|min:6',
|
||||
'password_confirmation' => 'required|same:password'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
9
app/Http/Requests/Request.php
Normal file
9
app/Http/Requests/Request.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
abstract class Request extends FormRequest {
|
||||
|
||||
//
|
||||
|
||||
}
|
30
app/Http/Requests/SlaRequest.php
Normal file
30
app/Http/Requests/SlaRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class SlaRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|unique:sla_plan',
|
||||
'grace_period'=> 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
29
app/Http/Requests/SlaUpdate.php
Normal file
29
app/Http/Requests/SlaUpdate.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class SlaUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'grace_period'=> 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/Sys_userRequest.php
Normal file
32
app/Http/Requests/Sys_userRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class Sys_userRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'email' => 'required|email',
|
||||
'full_name' => 'required|unique:sys_user',
|
||||
'phone' => 'size:10'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/Sys_userUpdate.php
Normal file
30
app/Http/Requests/Sys_userUpdate.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class Sys_userUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'phone' => 'size:10'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/SystemRequest.php
Normal file
32
app/Http/Requests/SystemRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class SystemRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
'name' => 'required',
|
||||
'url' => 'url'
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/TeamRequest.php
Normal file
30
app/Http/Requests/TeamRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TeamRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|unique:teams',
|
||||
'status' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/TeamUpdate.php
Normal file
30
app/Http/Requests/TeamUpdate.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TeamUpdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/TemplateRequest.php
Normal file
30
app/Http/Requests/TemplateRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TemplateRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
'name' => 'required|unique:template',
|
||||
'ban_status' => 'required',
|
||||
'template_set_to_clone' => 'required',
|
||||
'language' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
30
app/Http/Requests/TemplateUdate.php
Normal file
30
app/Http/Requests/TemplateUdate.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TemplateUdate extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
|
||||
'ban_status' => 'required',
|
||||
'template_set_to_clone' => 'required',
|
||||
'language' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
32
app/Http/Requests/TicketForm.php
Normal file
32
app/Http/Requests/TicketForm.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TicketForm extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'help_topic' => 'required',
|
||||
'Email' => 'required',
|
||||
'Subject' => 'required',
|
||||
'Detail' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
31
app/Http/Requests/TicketRequest.php
Normal file
31
app/Http/Requests/TicketRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class TicketRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'To' => 'required',
|
||||
'ticket_ID' => 'required',
|
||||
'ReplyContent' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user