Laravel version update
Laravel version update
This commit is contained in:
@@ -67,7 +67,7 @@ class FilterController extends Controller
|
||||
}
|
||||
}
|
||||
})
|
||||
->lists('ticket_id')
|
||||
->pluck('ticket_id')
|
||||
->toArray();
|
||||
|
||||
return $query;
|
||||
|
||||
@@ -1763,7 +1763,7 @@ class TicketController extends Controller
|
||||
public function autosearch($id)
|
||||
{
|
||||
$term = \Input::get('term');
|
||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->lists('email');
|
||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->pluck('email');
|
||||
echo json_encode($user);
|
||||
}
|
||||
|
||||
@@ -1776,7 +1776,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function autosearch2(User $user)
|
||||
{
|
||||
$user = $user->lists('email');
|
||||
$user = $user->pluck('email');
|
||||
echo json_encode($user);
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ class UserController extends Controller
|
||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||
$location = GeoIP::getLocation();
|
||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||
$org = Organization::lists('name', 'id')->toArray();
|
||||
$org = Organization::pluck('name', 'id')->toArray();
|
||||
|
||||
return view('themes.default1.agent.helpdesk.user.create', compact('org', 'settings', 'email_mandatory'))->with('phonecode', $phonecode->phonecode);
|
||||
} catch (Exception $e) {
|
||||
@@ -647,9 +647,9 @@ class UserController extends Controller
|
||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||
$orgs = Organization::all();
|
||||
// dd($org);
|
||||
$organization_id = User_org::where('user_id', '=', $id)->lists('org_id')->first();
|
||||
$organization_id = User_org::where('user_id', '=', $id)->pluck('org_id')->first();
|
||||
|
||||
// $org_name=Organization::where('id','=',$org_id)->lists('name')->first();
|
||||
// $org_name=Organization::where('id','=',$org_id)->pluck('name')->first();
|
||||
// dd($org_name);
|
||||
|
||||
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', '$settings', '$email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
|
||||
@@ -833,7 +833,7 @@ class UserController extends Controller
|
||||
$org_name = Input::get('org');
|
||||
|
||||
if ($org_name) {
|
||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
||||
$org = Organization::where('name', '=', $org_name)->pluck('id')->first();
|
||||
if ($org) {
|
||||
$user_org = new User_org();
|
||||
$user_org->org_id = $org;
|
||||
@@ -854,7 +854,7 @@ class UserController extends Controller
|
||||
$org_name = Input::get('org');
|
||||
|
||||
if ($org_name) {
|
||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
||||
$org = Organization::where('name', '=', $org_name)->pluck('id')->first();
|
||||
if ($org) {
|
||||
$user_org = User_org::where('user_id', '=', $id)->first();
|
||||
$user_org->org_id = $org;
|
||||
|
||||
@@ -134,7 +134,7 @@ class ArticleController extends Controller
|
||||
public function create(Category $category)
|
||||
{
|
||||
/* get the attributes of the category */
|
||||
$category = $category->lists('id', 'name');
|
||||
$category = $category->pluck('id', 'name');
|
||||
/* get the create page */
|
||||
try {
|
||||
return view('themes.default1.agent.kb.article.create', compact('category'));
|
||||
@@ -196,9 +196,9 @@ class ArticleController extends Controller
|
||||
$aid = $article->where('id', $slug)->first();
|
||||
$id = $aid->id;
|
||||
/* define the selected fields */
|
||||
$assign = $relation->where('article_id', $id)->lists('category_id');
|
||||
$assign = $relation->where('article_id', $id)->pluck('category_id');
|
||||
/* get the attributes of the category */
|
||||
$category = $category->lists('id', 'name');
|
||||
$category = $category->pluck('id', 'name');
|
||||
/* get the selected article and display it at edit page */
|
||||
/* Get the selected article with id */
|
||||
$article = $article->whereId($id)->first();
|
||||
|
||||
@@ -121,7 +121,7 @@ class CategoryController extends Controller
|
||||
public function create(Category $category)
|
||||
{
|
||||
/* Get the all attributes in the category model */
|
||||
$category = $category->lists('name', 'id')->toArray();
|
||||
$category = $category->pluck('name', 'id')->toArray();
|
||||
/* get the view page to create new category with all attributes
|
||||
of category model */
|
||||
try {
|
||||
@@ -167,7 +167,7 @@ class CategoryController extends Controller
|
||||
{
|
||||
/* get the atributes of the category model whose id == $id */
|
||||
$category = Category::whereId($id)->first();
|
||||
$categories = Category::lists('name', 'id')->toArray();
|
||||
$categories = Category::pluck('name', 'id')->toArray();
|
||||
/* get the Edit page the selected category via id */
|
||||
return view('themes.default1.agent.kb.category.edit', compact('category', 'categories'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user