My first commit of codes

This commit is contained in:
sujitprasad
2015-05-01 13:13:01 +05:30
parent 4c8e5096f1
commit a6e5a69348
8487 changed files with 1317246 additions and 0 deletions

View 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'
];
}
}

View 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'
];
}
}

View 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',
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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 [
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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',
];
}
}

View 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'
];
}
}

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,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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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'
];
}
}

View 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 [
];
}
}

View 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',
];
}
}

View 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',
];
}
}

View 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'
];
}
}

View 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'
];
}
}