<commit_before><?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Jobs\SendNotification;

use App\Client;
use App\Invoice;
use App\UserActivity;
use App\Quote;
use Carbon\Carbon;

use Auth;
use DB;
use Flash;
use Mail;

class DashboardController extends Controller
{
    public function renderDashboard()
    {
        $user = Auth::user();
        $this->dispatch(new SendNotification($user));
        $now = Carbon::now()->toDateTimeString();
        $clients = Client::all();
        $user_activity = UserActivity::latest()->get();

        foreach ($user_activity as $ua) {
            DB::table('user_activities_read_status')->insert([
                'user_id'     => $ua->user->id,
                'activity_id' => $ua->id,
                'is_read'     => 1
            ]);
        }

        foreach ($clients as $client) {
            $client->client_id = $client->id + 999;
        }

        $active_invoices = Invoice::active()->get();
        $overdue_invoices = Invoice::overdue()->get();
        $thirty_day_invocies = Invoice::paidInLastThirtyDays()->get();
        $previous_thirty_day_invocies = Invoice::paidInPreviousThirtyDays()->get();
        $this_year_invoices = Invoice::paidThisCalenderYear()->get();
        $last_year_invoices = Invoice::paidLastCalenderYear()->get();<commit_msg>without notification<commit_after><?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Jobs\SendNotification;

use App\Client;
use App\Invoice;
use App\UserActivity;
use App\Quote;
use Carbon\Carbon;

use Auth;
use DB;
use Flash;
use Mail;

class DashboardController extends Controller
{
    public function renderDashboard()
    {
        $now = Carbon::now()->toDateTimeString();
        $clients = Client::all();
        $user_activity = UserActivity::latest()->get();

        foreach ($user_activity as $ua) {
            DB::table('user_activities_read_status')->insert([
                'user_id'     => $ua->user->id,
                'activity_id' => $ua->id,
                'is_read'     => 1
            ]);
        }

        foreach ($clients as $client) {
            $client->client_id = $client->id + 999;
        }

        $active_invoices = Invoice::active()->get();
        $overdue_invoices = Invoice::overdue()->get();
        $thirty_day_invocies = Invoice::paidInLastThirtyDays()->get();
        $previous_thirty_day_invocies = Invoice::paidInPreviousThirtyDays()->get();
        $this_year_invoices = Invoice::paidThisCalenderYear()->get();
        $last_year_invoices = Invoice::paidLastCalenderYear()->get();
{'fraction_non_alphanumeric': 0.145748987854251, 'fraction_numerical': 0.002944423997055576, 'mean_word_length': 2.9164265129683, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5926580', 'n_tokens_mistral': 852, 'n_tokens_neox': 823, 'n_words': 148}