update v1.0.3.3

This commit is contained in:
sujitprasad
2015-12-22 14:09:23 +05:30
parent 2bc3db252e
commit 696e0390fe
8590 changed files with 3456 additions and 818 deletions

View File

@@ -0,0 +1,9 @@
<?php namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest {
//
}

View File

@@ -0,0 +1,43 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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:users',
'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',
];
}
}

View File

@@ -0,0 +1,42 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,27 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
class ArticleRequest 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',
'description' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* BanRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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' => 'required|email|unique:users',
'ban' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* BanlistRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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' => 'email',
'ban' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class CannedRequest 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',
'message' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class CannedUpdateRequest 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',
'message' => 'required',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* CheckTicket
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* CompanyRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class ClientRequest 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',
'Email'=>'required',
'Subject'=>'required',
'Details'=>'required',
];
}
}

View File

@@ -0,0 +1,29 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
class CommentRequest 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|max:10',
'email' => 'required|email',
'website' => 'url',
'comment' => 'required|max:60',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* CompanyRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,29 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
class ContactRequest 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',
'email' => 'required|email',
'subject' => 'required',
'message' => 'required|max:50',
];
}
}

View File

@@ -0,0 +1,40 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* CreateTicketRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* DepartmentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* DepartmentUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* DiagnoRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* EmailRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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 [
];
}
}

View File

@@ -0,0 +1,45 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* EmailsEditRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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'
'fetching_host' => 'required',
'fetching_port' => 'required',
'mailbox_protocol' => 'required',
];
}
}

View File

@@ -0,0 +1,44 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* EmailsRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
'fetching_host' => 'required',
'fetching_port' => 'required',
'mailbox_protocol' => 'required',
];
}
}

View File

@@ -0,0 +1,36 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* FormRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,32 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* GroupRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,38 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* HelptopicRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,37 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* HelptopicUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,37 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* InstallerRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class InstallerRequest 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 [
'firstname' => 'required|max:20',
'Lastname' => 'required|max:20',
'email' => 'required|max:50|email',
'username' => 'required|max:50|min:3',
'password' => 'required|min:6',
'confirmpassword' => 'required|same:password',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* LoginRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
class MessageRequest 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 [
'message_title' => 'required',
'message' => 'required'
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* OrganizationRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* OrganizationUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* ProfilePassword
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* ProfileRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* RegisterRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* SlaRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,32 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* SlaUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,37 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TicketForm
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class SmtpRequest 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 [
'host' => 'required',
'port' => 'required',
'encryption' => 'required',
'name' => 'required',
'email' => 'required',
'password' => 'required',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* Sys_userRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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|unique:users,email',
'full_name' => 'required',
// 'phone' => 'size:10',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* Sys_userUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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 [
'user_name' => 'required',
// 'email' => 'required|email',
// 'phone' => 'size:10',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* SystemRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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' => '',
'url' => 'url',
];
}
}

View File

@@ -0,0 +1,33 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TeamRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TeamUpdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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 [
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TemplateRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TemplateUdate
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,36 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* AgentRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class TicketEditRequest 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 [
// 'subject' => 'required',
// 'sla_paln' => 'required',
// 'help_topic' => 'required',
// 'ticket_source' => 'required',
// 'ticket_priority' => 'required',
];
}
}

View File

@@ -0,0 +1,35 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TicketForm
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php namespace App\Http\Requests\helpdesk;
use App\Http\Requests\Request;
/**
* TicketRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
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',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class ArticleRequest 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',
'slug' => 'required|unique:article',
'description' => 'required',
'category_id' => 'required',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class ArticleUpdate 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',
'slug' => 'required',
'description' => 'required',
'category_id' => 'required',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class CategoryRequest 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',
'slug' => 'required|unique:category',
'description' => 'required',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class CategoryUpdate 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',
'slug' => 'required',
'description' => 'required',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class CommentRequest 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|max:50',
'email' => 'required|email',
'website' => 'url',
'comment' => 'required|max:500',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class ContactRequest 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',
'email' => 'required|email',
'subject' => 'required|max:20',
'message' => 'required|max:60',
];
}
}

View File

@@ -0,0 +1,29 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class FooterRequest 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',
//'description' => 'required',
];
}
}

View File

@@ -0,0 +1,37 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
/**
* InstallerRequest
*
* @package Request
* @author Ladybird <info@ladybirdweb.com>
*/
class InstallerRequest 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 [
'firstname' => 'required|max:20',
'Lastname' => 'required|max:20',
'email' => 'required|max:50|email',
'username' => 'required|max:50|min:3',
'password' => 'required|min:6',
'confirmpassword' => 'required|same:password',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class PageRequest 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',
'slug' => 'required|unique:pages',
//'description' => 'required',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class PageUpdate 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',
'slug' => 'required',
//'description' => 'required',
];
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Http\Requests\kb;
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'
];
}
}

View File

@@ -0,0 +1,29 @@
<?php namespace App\Http\Requests\kb;
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 [
'firstname' => 'required',
'lastname' => 'required',
'profile_pic' => 'mimes:png,jpeg',
];
}
}

View File

@@ -0,0 +1,27 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class SearchRequest 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 [
's' => 'required',
];
}
}

View File

@@ -0,0 +1,28 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class SettingsRequests 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' => 'required|url',
];
}
}

View File

@@ -0,0 +1,42 @@
<?php namespace App\Http\Requests\kb;
use App\Http\Requests\Request;
class SocialRequest 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 [
'linkedin' =>'url',
'stumble' =>'url',
'google' =>'url',
'deviantart' =>'url',
'flickr' =>'url',
'skype' =>'url',
'rss' =>'url',
'twitter' =>'url',
'facebook' =>'url',
'youtube' =>'url',
'vimeo' =>'url',
'pinterest' =>'url',
'dribbble' =>'url',
'instagram' =>'url'
];
}
}