fix: fix documents not displayed on Storage page (#2094)

This commit is contained in:
Régis Freyd
2018-11-24 21:01:50 -05:00
committed by GitHub
parent 5d57a031ab
commit f972be3287
2 changed files with 4 additions and 3 deletions
@@ -12,9 +12,9 @@ class StorageController extends Controller
*/
public function index()
{
$documents = Document::with(['contact' => function ($query) {
$query->where('account_id', auth()->user()->account->id);
}])->orderBy('created_at', 'desc')->get();
$documents = Document::where('account_id', auth()->user()->account->id)
->orderBy('created_at', 'desc')
->get();
// count total account size
// size is in bytes in the database