<commit_before><?php

namespace Alpaca\Email\Controllers;

use Alpaca\Core\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class EmailController extends Controller
{
    public function index()
    {
        $emailTemplates = [
            [
                'text' => trans('user::user.register'),
                'link' => '/backend/email/register',
            ],
            [
                'text' => trans('user::user.reset_password'),
                'link' => '/backend/email/passwort_reset',
            ],
        ];

        return view('email::list', compact('emailTemplates'));
    }

    public function register()
    {
        $user = Auth::user();
        return view('user::emails.verification', compact('user'));
    }

    public function passwort_reset()
    {
        $mail = new \Illuminate\Auth\Notifications\ResetPassword('SECRET_TOKEN');
        $message = $mail->toMail(null);

        $template = $message->view[0];
        $data = $message->toArray();

        return view($template, $data);
    }
}<commit_msg>register email template viewable<commit_after><?php

namespace Alpaca\Email\Controllers;

use Alpaca\Core\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class EmailController extends Controller
{
    public function index()
    {
        $emailTemplates = [
            [
                'text' => trans('user::user.register'),
                'link' => '/backend/email/register',
            ],
            [
                'text' => trans('user::user.reset_password'),
                'link' => '/backend/email/passwort_reset',
            ],
        ];

        return view('email::list', compact('emailTemplates'));
    }

    public function register()
    {
        $mail = new \Illuminate\Auth\Notifications\VerifyAccount('SECRET_TOKEN', '<PASSWORD>');
        return $this->generateNotification($mail);
    }

    public function passwort_reset()
    {
        $mail = new \Illuminate\Auth\Notifications\ResetPassword('SECRET_TOKEN');
        return $this->generateNotification($mail);
    }

    /**
     * @param $mail
     * @return mixed
     */
    protected function generateNotification($mail)
    {
        $message = $mail->toMail(null);

        $template = $message->view[0];
        $data = $message->toArray();

        return view($template, $data);
    }
}
{'fraction_non_alphanumeric': 0.14516815666240954, 'fraction_numerical': 0.0008514261387824606, 'mean_word_length': 2.2147742818057456, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 20, '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': '4657368', 'n_tokens_mistral': 658, 'n_tokens_neox': 657, 'n_words': 111}