Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -87,7 +87,7 @@ class AgentController extends Controller
// get all department
$departments = $department->get();
// list all the teams in a single variable
$teams = $team->lists('id', 'name')->toArray();
$teams = $team->pluck('id', 'name')->toArray();
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
// returns to the page with all the variables and their datas
@@ -187,13 +187,13 @@ class AgentController extends Controller
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
$user = $user->whereId($id)->first();
$team = $team->where('status', '=', 1)->get();
$teams1 = $team->lists('name', 'id');
$teams1 = $team->pluck('name', 'id');
$timezones = $timezone->get();
$groups = $group->where('group_status', '=', 1)->get();
$departments = $department->get();
$table = $team_assign_agent->where('agent_id', $id)->first();
$teams = $team->lists('id', 'name')->toArray();
$assign = $team_assign_agent->where('agent_id', $id)->lists('team_id')->toArray();
$teams = $team->pluck('id', 'name')->toArray();
$assign = $team_assign_agent->where('agent_id', $id)->pluck('team_id')->toArray();
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
} catch (Exception $e) {

View File

@@ -84,7 +84,7 @@ class DepartmentController extends Controller
$emails = $email->select('email_name', 'id')->get();
$templates = $template->get();
$department = $department->get();
$groups = $group->lists('id', 'name');
$groups = $group->pluck('id', 'name');
return view('themes.default1.admin.helpdesk.agent.departments.create', compact('department', 'templates', 'slas', 'user', 'emails', 'groups'));
} catch (Exception $e) {
@@ -164,8 +164,8 @@ class DepartmentController extends Controller
$emails = $email->select('email_name', 'id')->get();
$templates = $template->get();
$departments = $department->whereId($id)->first();
//$groups = $group->lists('id', 'name');
$assign = $group_assign_department->where('department_id', $id)->lists('group_id');
//$groups = $group->pluck('id', 'name');
$assign = $group_assign_department->where('department_id', $id)->pluck('group_id');
return view('themes.default1.admin.helpdesk.agent.departments.edit', compact('assign', 'team', 'templates', 'departments', 'slas', 'user', 'emails', 'sys_department'));
} catch (Exception $e) {

View File

@@ -82,7 +82,7 @@ class EmailsController extends Controller
$mailbox_protocols = $mailbox_protocol->get();
$service = new \App\Model\MailJob\MailService();
$services = $service->lists('name', 'id')->toArray();
$services = $service->pluck('name', 'id')->toArray();
// return with all the table data
return view('themes.default1.admin.helpdesk.emails.emails.create', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'services'));
@@ -351,7 +351,7 @@ class EmailsController extends Controller
$mailbox_protocols = $mailbox_protocol->get();
$service = new \App\Model\MailJob\MailService();
$services = $service->lists('name', 'id')->toArray();
$services = $service->pluck('name', 'id')->toArray();
// return if the execution is succeeded
return view('themes.default1.admin.helpdesk.emails.emails.edit', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'emails', 'sys_email', 'services'))->with('count', $count);

View File

@@ -190,7 +190,7 @@ class FormController extends Controller
try {
$forms = new Forms();
$form = $forms->find($id);
$select_forms = $forms->where('id', '!=', $id)->lists('formname', 'id')->toArray();
$select_forms = $forms->where('id', '!=', $id)->pluck('formname', 'id')->toArray();
//dd($form);
if ($form) {
$fields = $form->fields();
@@ -209,7 +209,7 @@ class FormController extends Controller
try {
$forms = new Forms();
$form = $forms->find($id);
$select_forms = $forms->where('id', '!=', $id)->lists('formname', 'id')->toArray();
$select_forms = $forms->where('id', '!=', $id)->pluck('formname', 'id')->toArray();
//dd($form);
if ($form) {
$fields = $form->fields();
@@ -541,7 +541,7 @@ class FormController extends Controller
$session = self::getSession();
$script = self::jqueryScript($field_value = '', $field->id, $field->name, $field_type);
$form_hidden = Form::hidden('fieldid[]', $field->id, ['id' => 'hidden'.$session.$field->id]).Form::label($field->label, $field->label, ['class' => $required_class]);
$select = Form::$field_type($field->name, ['' => 'Select', 'Selects' => self::removeUnderscoreFromDB($field->values()->lists('field_value', 'field_value')->toArray())], null, ['class' => "form-control $session$field->id", 'id' => $session.$field->id, 'required' => $required]).'</br>';
$select = Form::$field_type($field->name, ['' => 'Select', 'Selects' => self::removeUnderscoreFromDB($field->values()->pluck('field_value', 'field_value')->toArray())], null, ['class' => "form-control $session$field->id", 'id' => $session.$field->id, 'required' => $required]).'</br>';
$html = $script.$form_hidden.$select;
$response_div = '<div id='.$session.$field->name.'></div>';
@@ -552,7 +552,7 @@ class FormController extends Controller
{
$radio = '';
$html = '';
$values = $field->values()->lists('field_value')->toArray();
$values = $field->values()->pluck('field_value')->toArray();
if (count($values) > 0) {
foreach ($values as $field_value) {
$script = self::jqueryScript($field_value, $field->id, $field->name, $field_type);
@@ -570,7 +570,7 @@ class FormController extends Controller
$session = self::getSession();
$checkbox = '';
$html = '';
$values = $field->values()->lists('field_value')->toArray();
$values = $field->values()->pluck('field_value')->toArray();
if (count($values) > 0) {
$i = 1;
foreach ($values as $field_value) {

View File

@@ -48,7 +48,7 @@ class GroupController extends Controller
{
try {
$groups = $group->get();
$departments = $department->lists('id');
$departments = $department->pluck('id');
return view('themes.default1.admin.helpdesk.agent.groups.index', compact('departments', 'group_assign_department', 'groups'));
} catch (Exception $e) {

View File

@@ -49,7 +49,7 @@ class TeamController extends Controller
try {
$teams = $team->get();
/* find out the Number of Members in the Team */
$id = $teams->lists('id');
$id = $teams->pluck('id');
$assign_team_agent = $assign_team_agent->get();
return view('themes.default1.admin.helpdesk.agent.teams.index', compact('assign_team_agent', 'teams'));
@@ -213,7 +213,7 @@ class TeamController extends Controller
$a_id = [];
$teams = $team->whereId($id)->first();
$agent_team = $assign_team_agent->where('team_id', $id)->get();
$agent_id = $agent_team->lists('agent_id', 'agent_id');
$agent_id = $agent_team->pluck('agent_id', 'agent_id');
foreach ($agent_id as $value) {
array_push($a_id, $value);
}

View File

@@ -145,7 +145,7 @@ class WorkflowController extends Controller
public function create(Emails $emails)
{
$email_data = '';
foreach ($emails->lists('email_address', 'id') as $key => $email) {
foreach ($emails->pluck('email_address', 'id') as $key => $email) {
$email_data["E-$key"] = $email;
}
$emails = $email_data;