<commit_before><?php

namespace App\Modules\Logs\Observers;

use Nova\Support\Facades\Auth;
use Nova\Support\Facades\Request;

use App\Modules\Logs\Models\Log;


class UserActionsObserver
{
    public function saved($model)
    {
        if (Auth::check()) {
            $user = Auth::user();

            if ($model->wasRecentlyCreated == true) {
                // Data was just created
                $action = __d('system', 'created');
            } else {
                // Data was updated
                $action = __d('system', 'updated');
            }

            Log::create(array(
                'user_id'  => $user->getKey(),
                'group_id' => 2,
                'message'  => $this->getMessage($model, $action),
                'url'      => $this->getUrl(),
            ));
        }
    }

    public function deleting($model)
    {
        if (Auth::check()) {
            $user = Auth::user();

            $action = __d('system', 'deleted');
<commit_msg>small fix lang domain for Logs<commit_after><?php

namespace App\Modules\Logs\Observers;

use Nova\Support\Facades\Auth;
use Nova\Support\Facades\Request;

use App\Modules\Logs\Models\Log;


class UserActionsObserver
{
    public function saved($model)
    {
        if (Auth::check()) {
            $user = Auth::user();

            if ($model->wasRecentlyCreated == true) {
                // Data was just created
                $action = __d('logs', 'created');
            } else {
                // Data was updated
                $action = __d('logs', 'updated');
            }

            Log::create(array(
                'user_id'  => $user->getKey(),
                'group_id' => 2,
                'message'  => $this->getMessage($model, $action),
                'url'      => $this->getUrl(),
            ));
        }
    }

    public function deleting($model)
    {
        if (Auth::check()) {
            $user = Auth::user();

            $action = __d('system', 'deleted');

{'fraction_non_alphanumeric': 0.15168257157207435, 'fraction_numerical': 0.0010045203415369162, 'mean_word_length': 1.573643410852713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '7480987', 'n_tokens_mistral': 579, 'n_tokens_neox': 560, 'n_words': 115}