public function showLogs() { $departmentId = Auth::user()->current_department; $department = Department::find($departmentId)->long_name; $logs = Models\Log::where('department_id', '=', $departmentId)->where('user_id', '=', Auth::user()->id)->where('out_time', '!=', '')->orderBy('created_at', 'desc')->paginate(15); //->get(); $this->layout->content = View::make('dashboard.logs')->with('title', 'Logs')->with('logs', $logs)->with('department', $department); }