Eager load assets

This commit is contained in:
snipe
2015-10-21 23:25:23 -07:00
parent f06af97364
commit eb5649d0b3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<?php
return array (
'app_version' => 'v2.0-317',
'hash_version' => 'v2.0-317-g2e044bf',
'app_version' => 'v2.0-318',
'hash_version' => 'v2.0-318-gb1d5812',
);
@@ -218,7 +218,7 @@ class CategoriesController extends AdminController
public function getDatatable()
{
// Grab all the categories
$categories = Category::orderBy('created_at', 'DESC');
$categories = Category::with('assets');
if (Input::has('search')) {
$categories = $categories->TextSearch(e(Input::get('search')));