# github_gpt

milvus_id: 452165072252045683
data:
:source,2*
(app/Console/Commands/GenerateSitemap.php(d
=	file_path,2*
(app/Console/Commands/GenerateSitemap.php(e
(	file_name2
GenerateSitemap.php(f
	file_type2
.php(g
�
text�
2�
�
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Spatie\Crawler\Crawler;
use Spatie\Sitemap\Sitemap;
use Spatie\Sitemap\SitemapGenerator;
use Spatie\Sitemap\Tags\Url;

class GenerateSitemap extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'sitemap:generate';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Generate sitemap';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $sitemap = SitemapGenerator::create(config('app.url'));
        $sitemap->configureCrawler(function (Crawler $crawler) {
                $crawler->setMaximumDepth(5);
            });
        $sitemap->hasCrawled(function (Url $url) {
                // Ausschließen aller Routen, die mit /oauth beginnen
                if (strpos($url->path(), '/oauth') === 0 || $url->path() == '/register' || $url->path() == '/') {
                    return null;
                }

                $url->setChangeFrequency(Url::CHANGE_FREQUENCY_DAILY);
                $url->setPriority(0.8);

                return $url;
            });
        $sitemap->getSitemap()
            ->add(Url::create('/registrar-criador'));
        $sitemap->writeToFile(public_path('sitemap.xml'));

        // Send Get request to https://85uptime.com/webhook-heartbeat/e510ab9af5348c39f308384337ad37aa
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, 'https://85uptime.com/webhook-heartbeat/e510ab9af5348c39f308384337ad37aa');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $heartbeat = curl_exec($ch);
        curl_close($ch);
    }
}
(h
pk

	��̷��(i
�0evector"�0��0
�0�Pռ��;�9<b���ՒѼ�-���(�+����s�<����ؖ�ip���9<\]���Z<�UL:�I�倈<`
�<6��p��=5#�����9(=~;����;�E-��t<L�"<|��,ͼPt���H'�X�����)=��M;�ɕ:/D0=����h��Yc��za=���<�c����%�讛������?�<��ټ�1�8R��L�";Ւ�<���(�U�缉�¼Uҳ;B�<�%��Ƨ
� ,�<����#]��l�;o#o��&���M;Ʀ:<<=g��<��[�#h��b={5k����t��<p�v��w��������f�e�μҸ6�*�$O���="\��(�&�s�Y<w��<h�5<uV����s�ٺ�
=#���2;L�N�<�g<4ˢ=ջ}�����0�7�"�(<�~x�f@ֻO��;}{<���z�u�-�T�';\�9=����uj=>����<MG*�pі;� U=���%L��8�;C�	�v�D�_� <��;��
<��ɻ��Z���\ݼ9��<���;����+��v�����=���<�o)�!��<��y<���|��#輂��<6$���Y:n����6�<�:����n���W=�J��Gg;�%�<KC��_b�;�H<��=���$�o���8�:X���ՒQ<��߼�1�$O�X�����<oO�֍<+�
������\]<�ɥ<3<Gh(=���<�;߼��:ip	��ܾ;<�g<G=ܼ��I��i%=����n���H<N^<����ܻ�Q5=�;�QL�<
g�;���[�5<���<3Q�ּ��'=*�	�d��H'<��;�@	=oN�<8P�<p��d�ek"; 8:���<ip�< Q���b���)=c=�;��Ӽ�����n=(�Z=
����%�̯�<�f;��;\���D�
�);2����<iF
��B�E��(�Z��f��0�;_��<����P�<��%<Ƨ
��ۡ�b�7<��1<�s��?v;H=�=�-z���ҹ��8'I��h�<0�;�rRҼ��+=���W*C����<�ʲ��xd�U��t�=�L>�uVi<ϴ�<��=t��;n�������l��U�<�F:<��;Db��p6�b��/D0=�CP<q�<T��<���<l=
������<�\=T�<�K~<m�/��za<��C<JAs���h<z�c=�<�+��� U=��Z<9��;{a��=�4��������ټ���<⥝��[:�[@=JAs���I=�4μK�<������=(�ip�;눶<�Q5���<4!��ľ<�=<H�:���=��;
��;�)�}�<;,0�٘�<�Z���Į<�P�<`8(�iD���l|�,>y�4��:gñ�EM��K~<�T�<��
��h�3�;<���:�q�p�;�`��JA󼐀;�w�;VT�<;V�;�A<Db�93��<�<|=�bQ<_b$���<0�k<�
�<�˂;��<�f+�be���<O��"\0=	�`�>[�<>ZC�Z�8>���B�5��
=��B<nx7=�2�<�=��<�&<O�e��=�\�<�=>/w<oO=��^��;���<��y<f*<�Z#=\����I�����;~d�<h�5=��K<�z=��'=�����U�#24<�����>; X���Ȉ7��ՒQ<��<�=��!�:�����?�<5#2�ͅ<==	�:|
=�%�<0�7<ksP�z����<�/W����<��`��s=/伢q�<'
=��=�<��j�H<^��<~e�F�Լ�AӼ��K�����,�;E��$�X�~<�Ԑ�MG*;]	E=�<m�/=��y�nx�<�F:<z��;�nY��b�; ,��(f���S=t�<	��0�<�Z�-� �ӻՒQ��r�6�5��a�ՒѼ�f<A5�<v�x;��=R���za;���눶<�Bp<8|�<9(:F� ��Z#��v:�Tϸ�T�|���G���nټ�4N�WU��<-=��=��q���:9�<.�(=��ǻ.�$��L����=F�<X�J;^
=cs�,j=��<�b����>�=ҹ�<������<�q�D����^:���S��3���w<x\�:�H7�xG<S2����Ŏ�U��TO�����J�;���<�C�<p��_aT��qS:,�;���Y=�����<�����=��[<ۚ���Qr<�{!��8�8'ɼ):�;ho��^��;8R�<�n<ɫ����<9�����n=
8��%���9�|<=������;�J=��K;�ȼ_b$�� �T�߼^��<�gH�=���P=H0< Q�Jm�<ek"=5#2<��<�W�<Z���vʻ5#2<���<�ؗ<͆�<6�e��g8<u��?��J�=������<�&6�;Pu��W�;{��<[�a���H�ɫ�<��%����<|��ؖ�B
b=���=���;̯8��:;��w�ҹ�;�vڔ����<�2��_��<j�#]��ՒQ�1�<��:=B�<Dbq;oO����{�B�5=r)�;"���|^�#8;y�:�<Ʀ:={a��8|�t��<ho9=�]-=�T�<-�T��%̻�Gg<��ܼSOX<p�B<��1=u-=<��K������)�;T���:�:ɫ!��m������4=0��R� =d��W*C<�X�<�^�<����<L�=�Ej<5L޻��E9��\;u���d����Ԁ���Ļ}���I�<d�=�T<��;:��<*��<��n�{�����ļ�<1qs<������<��K;Z.Z�t�a��gH<��Ļ3�<�B�9��n�=��};$	���q���;+�<����
fK�><����ʁ%=�y����l��E�:$ߋ��l��uVi�c=��EM�8P��c=�<T��馹�ľ���r<�#2�<���;���<�8e�<ط�TO���<nx�;ջ���:���<�PU��M�;�?��(�ڼ��%=1�<<�g�d�z�C�	=E�;�=~e�:��F�Id�}.=�yD<�?��9�P=�����+<���8� �<U�3<����ݎ<��0<���\�i=���<Wɼ��?�'�һoy�;�X��1:�vʻ��ͺv��ɫ���k<���Mpֻ��E����¼��<�$����;� �L�κ��<�a<��=I�뼃�H��%̼Q u���I����:;�MۼDd9�e=�)�yޫ��o�<H�<�w�=�;=z��<p����#���𗼶��<�7����9�<=�<B�<���<������K�d��<��<�S���/;�=�I���K!<��U�K���M<t�a��[�<��.<�"��o�T�߼>/�<�cn��Ȉ=�w
=:Ԡ�2I�����;�����<�[;Q�|�d�Ƽ�
�<\�	���;�W�<��?�w�L�̿<uW9�0
��[�<��8�KG�I�:��¼�u�)6�j�|;��\=���;̰=��:Cⅻ�Yc<��+=��@�Q��:���q��)�<i��3ѻB<��ɺ�ֺ��Ej<�c�<X���[۱�@�������弻��<]	�<���<��j<Cⅼ|�r���<Q�ȼ�)=��<<͆��x2$<�t�:K;�Y<$�o��Z�>�<C��<TO�5L�<�FJ��=p�=��<�_��̿<������PK���')����
B;%�;�^�<�_׻倈�iE�:��>�
%=8R��h��@��<�����;?�;��=�1<[����[��p�<��������>�j�m���]	E���2I<B�|
��%<���=��be����뉆�p����Y<�3�;�á<n<�}ۻ9�P����<@�R���+�z�3=/�VT?<�{��1�����n<h��<�C��K����<bf;�~d�;ɀU<`8�<�y�<��w9�x�,�:YY����4���<��<.�$<��<�z��H���Y�;2I��Sz��ӏ�<\�=oy���&�i��<|7<3�;p%�;�\ݼG=\;��S<e��<�ƛ;]4<��I<}�z��0'����iE=��
B<7�
�&��1��;WU��ڻEy����<���<��U�]	ż�
¼9�|=�7�;=��<�Pռ��<&:��;���N�<�"9&7<���<��:��ݻ
;�<�\ݻ���;4w�<�"�<��
<�u�;\]=<�.=�<�=
b�<w�L�=��;\�	=�-�o$?�]2�ɀռ�j¼*��<�=/D0=���v�<lJ�<�(	��D��]4��s��;<-���[��UӃ����<�}��i��ͅ�;g����31�]2�<�4λ�B3��;=�J�y�<�
��Q�<I�;�U����n�<5L^������P��6+<�&���Z��qS<�CP���f���4�<�м�
�H�<QL�#3�͆���FJ��ƫ<�߸<�0��G�y�[<B����:��lJ���ܻ����_���9��j򔼰��<�A�W*C���,<�i%<VSo�<�g<��h��I�<��!��;�Dbq����):�"��<O�<&7��{a�<V�����!5=�[��Z�<%���_
=Jm��Ԁ<�J�V����;讛�/4���<�[@�=�=�`'��E�<be��T����~���J<�?=Q u�`
�<��¼3�N�VT?;m�߼+��;��@=����9��Ҹ�<̿��r#<g�];W+����+#;�;����T<�ͼ;�`':�;߼�b����ɹ��-:����<��@<�n�;���;���<��<8'ɼ$�;<���<��v<�c�?<�0�;/D�<X<�$�����ռe�<�F�;���<�R�<O��<���<7�
=yޫ<VS�<>���6���i�;t����:��]�uX	<G>��(�;���<lJ$=ɀU�.¤<v��;��"�,=I��<�
<���<Dd�E��;���M�;�)�=�_
�fA��H��N޼�4��8�
7h��;�
fK<E�<���.�������M<|�r��$<����n<�:¼���<W�v<�&�<��<*�<Gh(�+�q<ҹ�ҹ=+��<�o�9�}[�\����C;��<]	E��y4�h�5<�<|;a�/�_���馻B��#<Њ���Tl<Ʀ:<�K�; Q����?�<��ڻ�ޛ=)�:@��;��H<Z.���I<B�<2Hǻ��!<�[�A5.<=���񼀻�R�:�,����<�������ek��|
<�P��0ƻ<\}9���ۚ�<#]�<C�i�(�*�^�=����nY���K�v��<R��<��<ՒQ<
c��q{�<⥝�{`��JA�;~dμ);�<�X<�M�<�p����@�4��<����R��������>=͆�<ҹ�9�挻g�]<?��B
b=������<�yļ�d�$�=):b<|�;�D<�ң<S2=���$޻<Y�Ҽ5#�9����iA<L�;����T<S2< �:̿<���`
�<��<v�:ս:�vJ��
���
=�;��̯8<��<͆���;(f�Cⅻ�>;�?�WI���C��<0
=�P�<��׼+iE=�S=�f��!��%�<�;R���\��<ƥj���b�Oʅ�n��9ߠ�;�T�;��M=���<�8�S���"�x1T<���;\��;u-�<�[@�\����w�(f�j�ȼ�j����<�����0��_b$<�3n��f;7{�<4�ֻW�v��;�Xf�L���B�d��<��be�Xf<�w���<B
b<m�_<�_�<a�c��T/<j�H<��?�N�����<A�<~d�<t0;�k=A6<F��l;'�<��;�<ߡ<w�=D9E���<4w*�H�3���<����^����CP<��<�q��%�C=���v�<񼀼��=)�8��O;�7=�yD<Ӽ.m\<���� X<C��<ϴ�<Pu��p�;��:�{�=�P�<��W<<-�$	���`'<�E-;�<�{���d>;D9E�)6=ۚ����y=�f<��n=���<���<��;����vJ<j�ȼ�+�;l (=�H7;�]�;讛<1ǋ�I�<áS<�i%=�[��=�;<?��w
���8�{6��(j
RowID

	��̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045684
data:
4source&2$
"app/Console/Commands/GithubWTD.php(d
7	file_path&2$
"app/Console/Commands/GithubWTD.php(e
"	file_name2

GithubWTD.php(f
	file_type2
.php(g
��text��2��
��<?php

namespace App\Console\Commands;

use App\Models\Webhook;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

class GithubWTD extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'github:what-the-difference';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Check for new GitHub pull requests with the body "wtd" and update them with the response from OpenAI.';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $webhooks = Webhook::where('source', 'github.com')
                            ->whereRaw('created_at = updated_at')
                            ->get();

        foreach ($webhooks as $webhook) {
            $data = json_decode($webhook->webhook, true);
            if (isset($data['pull_request'])) {
                $this->info('Webhook ID: ' . $webhook->id);
                $pullRequest = $data['pull_request'];
                if ($pullRequest['base']['ref'] === 'master' && $pullRequest['body'] === 'wtd' && $data['action'] != 'closed'/* && $data['number'] == '80'*/) {
                    $this->info('Pull Request #' . $pullRequest['number'] . ': ' . $pullRequest['head']['ref'] . ' in to ' . $pullRequest['base']['ref']);
                    $githubAccept = 'application/vnd.github.v3+json';
                    $githubKey = 'Bearer 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';
                    $githubVersion = '2022-11-28';
                    $client = new Client();
                    $githubHeaders = [
                        'Accept' => $githubAccept,
                        'Authorization' => $githubKey,
                        'X-GitHub-Api-Version' => $githubVersion,
                    ];
                    
                    try { // Versuchen Sie, die Dateien des Pull-Requests zu erhalten
                        $response = $client->request('GET', "https://api.github.com/repos/{$data['repository']['full_name']}/pulls/{$pullRequest['number']}/files", [
                            'headers' => $githubHeaders
                        ]);

                        // Setze die Variable $files und filtere Dateien, die nicht relevant sind
                        $files = json_decode($response->getBody()->getContents(), true);
                        $files = array_filter($files, function ($file) {
                            $filename = $file['filename'];
                            return !(
                                strpos($filename, '.gitignore') !== false ||
                                strpos($filename, '.md') !== false ||
                                strpos($filename, '.lock') !== false ||
                                strpos($filename, '-lock') !== false ||
                                strpos($filename, 'npm-cache') !== false ||
                                strpos($filename, '/img/') !== false ||
                                strpos($filename, 'tinymce') !== false ||
                                strpos($filename, 'errorpages') !== false
                            );
                        });

                        // Entferne spezifische Schlüssel aus jedem Element des Arrays
                        $files = array_map(function ($file) {
                            unset($file['sha'], $file['blob_url'], $file['raw_url'], $file['contents_url']);
                            return $file;
                        }, $files);

                        // Sortiere die Dateien nach Status
                        usort($files, function ($a, $b) {
                            $order = ['added' => 1, 'modified' => 2, 'renamed' => 3, 'removed' => 4];
                            return $order[$a['status']] <=> $order[$b['status']];
                        });

                        // Erstellen Sie die Daten, die an die OpenAI-API gesendet werden
                        $openAiKey = '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';
                        $openAiRunData = ['assistant_id' => 'asst_ZR0g5xfjrkVXpLDHC67EBAxL','thread' => ['messages' => [['role' => 'user','content' => json_encode($files)]]]];

                        // Bereite die Informationen für OpenAI vor um das Fine Tune Model weiter zu trainieren
                        $fineTunePrompts = array_map(function ($file) {
                            $additions = isset($file['additions']) ? $file['additions'] : 0;
                            $deletions = isset($file['deletions']) ? $file['deletions'] : 0;
                            $changes = isset($file['changes']) ? $file['changes'] : 0;
                            $patch = isset($file['patch']) ? "\nÄnderungen im Code:\n" . $file['patch'] : "";
                            return "Beschreibe die Änderungen an der Datei '{$file['filename']}' mit dem Status '{$file['status']}'. Die Datei hat {$additions} Zeilen hinzugefügt, {$deletions} Zeilen gelöscht und {$changes} Änderungen insgesamt." . $patch;
                        }, $files);
                        $completitionThreadId = '';
                        foreach ($fineTunePrompts as $prompt) {
                            try {
                                $completitionThreadResponse = $client->request('POST', 'https://api.openai.com/v1/threads/runs', ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',],'body' => json_encode(['assistant_id' => 'asst_Y7oKn438puSOi7pSJ6yIL4aK','thread' => ['messages' => [['role' => 'user','content' => $prompt]]]])]);
                                $completitionThreadData = json_decode($completitionThreadResponse->getBody()->getContents());
                                $completitionThreadId = $completitionThreadData->thread_id;
                                $completitionRunId = $completitionThreadData->id;
                                $completitionStatus = '';
                                do { // Warten, bis der Run abgeschlossen ist
                                    try { // Status des Runs abfragen
                                        $completitionRunResponse = $client->request('GET', 'https://api.openai.com/v1/threads/' . $completitionThreadId . '/runs/' . $completitionRunId, ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',]]);
                                        $completitionRunResponseData = json_decode($completitionRunResponse->getBody()->getContents());
                                        $completitionStatus = $completitionRunResponseData->status ?? '';
                                        if ($completitionStatus !== 'completed') {$this->info('Run ' . $completitionStatus);sleep(10);}
                                    } catch (GuzzleException $e) { // Fehlerbehandlung für die Anfrage an die OpenAI-API, um den Status des Runs abzurufen
                                        Log::error('OpenAI Check Run Status Error: ' . $e->getMessage());
                                        break; // Beendet die Schleife im Fehlerfall
                                    }
                                } while ($completitionStatus !== 'completed');
                                if ($completitionStatus === 'completed') {
                                    $this->info('Run ' . $completitionStatus);
                                    $completitionMessageResponse = $client->request('GET', 'https://api.openai.com/v1/threads/' . $completitionThreadId . '/messages', ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',]]);
                                    $completitionMessageData = json_decode($completitionMessageResponse->getBody()->getContents());
                                    $completitionAssistantMessages = array_filter($completitionMessageData->data, function($message) {return $message->role === 'assistant';});
                                    $completitionFirstAssistantMessage = reset($completitionAssistantMessages)->content[0]->text->value ?? '';
                                    $fineTuningData[] = [
                                        "messages" => [
                                            ["role" => "system", "content" => "You are an assistant that provides clear and concise explanations of code."],
                                            ["role" => "user", "content" => $prompt],
                                            ["role" => "assistant", "content" => $completitionFirstAssistantMessage]
                                        ]
                                    ];
                                }
                            } catch (\Exception $e) {
                                echo "Ein Fehler ist aufgetreten: " . $e->getMessage();
                            }
                        }
                        $numberOfExamples = count($fineTuningData);
                        if ($numberOfExamples < 10) {
                            $this->info("Weniger als 10 Beispiele gefunden, dupliziere die vorhandenen Beispiele...");
                            $neededExamples = 10 - $numberOfExamples;
                            for ($i = 0; $i < $neededExamples; $i++) {
                                $fineTuningData[] = $fineTuningData[$i % $numberOfExamples]; // Dupliziere die vorhandenen Beispiele
                            }
                        }
                        if (isset($fineTuningData) && !empty($fineTuningData)) {
                            $dateTime = date('Y-m-d_H-i-s');
                            $fileName = "fine_tune_creatify_{$dateTime}.jsonl";
                            $fileHandle = fopen($fileName, 'w');
                            foreach ($fineTuningData as $entry) {
                                fwrite($fileHandle, json_encode($entry) . "\n");
                            }
                            fclose($fileHandle);
                            $this->info('Fine Tuning Data in Chat Format: ' . $fileName);
                        }
                        $completitionUploadResponse = $client->request('POST', 'https://api.openai.com/v1/files', [
                            'headers' => [
                                'Authorization' => 'Bearer ' . $openAiKey,
                            ],
                            'multipart' => [
                                [
                                    'name' => 'purpose',
                                    'contents' => 'fine-tune',
                                ],
                                [
                                    'name' => 'file',
                                    'contents' => fopen($fileName, 'r'),
                                    'filename' => $fileName,
                                ],
                            ],
                        ]);
                        unlink($fileName);
                        $this->info('Fine Tuning Data Upload Response: ' . $completitionUploadResponse->getBody()->getContents());

                        try { // Thread inkl. Run bei OpenAI starten
                            $threadId = ''; // thread_MxzyvLbkwqd2luT6oagm0yxu hat keine Zusammenfassung am Ende // thread_T3ZhtJtc09lnXEPuERZCUASb hat horizontale Linie
                            if ($threadId === '') {
                                $openAiRunThreadResponse = $client->request('POST', 'https://api.openai.com/v1/threads/runs', ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',],'body' => json_encode($openAiRunData)]);
                                $runThreadResponseContent = $openAiRunThreadResponse->getBody()->getContents();
                                $threadId = json_decode($runThreadResponseContent)->thread_id;
                                $this->info('Thread ID: ' . $threadId);
                                $runId = json_decode($runThreadResponseContent)->id;
                            } else {
                                $addMessageResponse = $client->request('POST', 'https://api.openai.com/v1/threads/' . $threadId . '/messages', ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',],'body' => json_encode(['role' => 'user','content' => json_encode($files)])]);
                                $addMessageResponseContent = $addMessageResponse->getBody()->getContents();
                                $threadId = json_decode($addMessageResponseContent)->thread_id;
                                $this->info('Thread ID: ' . $threadId);
                                $startRunResponse = $client->request('POST', 'https://api.openai.com/v1/threads/' . $threadId . '/runs', ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',],'body' => json_encode(['assistant_id' => 'asst_gxOsTcIAovTrUZmgSPUyqGHg'])]);
                                $runId = json_decode($startRunResponse->getBody()->getContents())->id;
                            }

                            $status = '';
                            do { // Warten, bis der Run abgeschlossen ist
                                try { // Status des Runs abfragen
                                    $runResponse = $client->request('GET', 'https://api.openai.com/v1/threads/' . $threadId . '/runs/' . $runId, ['headers' => ['Content-Type' => 'application/json','Authorization' => 'Bearer ' . $openAiKey,'OpenAI-Beta' => 'assistants=v2',]]);
                                    $runResponseContent = $runResponse->getBody()->getContents();
                                    $runResponseData = json_decode($runResponseContent);
                                    $status = $runResponseData->status ?? '';
                                    if ($status !== 'completed') {$this->info('Run ' . $status);sleep(10);}
                                } catch (GuzzleException $e) { // Fehlerbehandlung für die Anfrage an die OpenAI-API, um den Status des Runs abzurufen
                                    Log::error('OpenAI Check Run Status Error: ' . $e->getMessage());
                                    break; // Beendet die Schleife im Fehlerfall
                                }
                            } while ($status !== 'completed');
                            if ($status === 'completed') {
                                $this->info('Run ' . $status);
                                try { // Nachrichten des Threads abrufen
                                    // Nachrichten des Threads abrufen
                                    $messageResponse = $client->request('GET', 'https://api.openai.com/v1/threads/' . $threadId . '/messages', [
                                        'headers' => [
                                            'Content-Type' => 'application/json',
                                            'Authorization' => 'Bearer ' . $openAiKey,
                                            'OpenAI-Beta' => 'assistants=v2',
                                        ]
                                    ]);

                                    $messageContent = $messageResponse->getBody()->getContents();
                                    $messageData = json_decode($messageContent);
                                    $assistantMessages = array_filter($messageData->data, function($message) {
                                        return $message->role === 'assistant';
                                    });
                                    $firstAssistantMessage = reset($assistantMessages);

                                    if ($firstAssistantMessage && !empty($firstAssistantMessage->content)) {
                                        $firstContentValue = $firstAssistantMessage->content[0]->text->value;
                                        $firstContentValue = str_replace('"""', '', $firstContentValue);
                                
                                        // Überprüfen, ob die Antwort mit "# Pull Request Description" beginnt und entfernen
                                        if (strpos($firstContentValue, '# Pull Request Description') === 0) {
                                            // Entfernen des "# Pull Request Description" und der eventuell folgenden leeren Zeile
                                            $firstContentValue = preg_replace('/^# Pull Request Description\s*\n\s*\n?/', '', $firstContentValue);
                                        }
                                
                                        // Überprüfen auf "## Headline" und entsprechende Anpassungen
                                        if (preg_match('/## Headline\s*\n(.+)/', $firstContentValue, $matches)) {
                                            $title = trim($matches[1]);
                                            $title = "# {$pullRequest['number']} " . $title;
                                
                                            // Entfernen der "## Headline" und der darauffolgenden Zeile
                                            $firstContentValue = preg_replace('/## Headline\s*\n.+\n?/', '', $firstContentValue);
                                        } else {
                                            $title = "# {$pullRequest['number']} " . "Pull Request"; // Fallback Titel
                                        }
                                
                                        // Sicherstellen, dass $body nicht mit einer leeren Zeile beginnt
                                        $body = ltrim($firstContentValue, "\n");
                                
                                        // Füge die Pull-Request-Nummer inkl. OpenAI API Antwort als Referenz in die Datei version.md ein
                                        $prNumber = $pullRequest['number'];
                                        $position = strpos($body, ' ') + 1; // +1, um das Leerzeichen selbst zu überspringen
                                        $versionContent = substr_replace($body, "#$prNumber ", $position, 0);
                                
                                        $filePath = 'version.md';
                                        try {
                                            // Zuerst den aktuellen SHA der Datei abrufen
                                            $response = $client->request('GET', "https://api.github.com/repos/{$data['repository']['full_name']}/contents/$filePath", [
                                                'headers' => [
                                                    'Accept' => $githubAccept,
                                                    'Authorization' => $githubKey,
                                                    'X-GitHub-Api-Version' => $githubVersion,
                                                ],
                                            ]);
                                
                                            $fileData = json_decode($response->getBody(), true);
                                            $sha = $fileData['sha'];
                                            $currentContent = base64_decode($fileData['content']);
                                
                                            // Aktuellen Inhalt aktualisieren
                                            $updatedContent = $versionContent . "\n\n---\n\n" . $currentContent;
                                            $encodedContent = base64_encode($updatedContent);
                                
                                            // Datei aktualisieren und committen
                                            $response = $client->request('PUT', "https://api.github.com/repos/{$data['repository']['full_name']}/contents/$filePath", [
                                                'headers' => [
                                                    'Accept' => $githubAccept,
                                                    'Authorization' => $githubKey,
                                                    'X-GitHub-Api-Version' => $githubVersion,
                                                ],
                                                'json' => [
                                                    'message' => 'Update version.md with pull request ' . $prNumber,
                                                    'committer' => [
                                                        'name' => 'SaschaNe',
                                                        'email' => 'sascha@creativeskyline.com',
                                                    ],
                                                    'content' => $encodedContent,
                                                    'sha' => $sha,
                                                ],
                                            ]);
                                
                                            if ($response->getStatusCode() == 200) {
                                                $this->info('version.md in GitHub-Repository erfolgreich aktualisiert');
                                            } else {
                                                Log::error('Failed to update version.md in the GitHub repository.');
                                            }
                                        } catch (\Exception $e) {
                                            Log::error('Error updating version.md: ' . $e->getMessage());
                                        }
                                
                                        try {
                                            // Update GitHub Pull Request Title and Body
                                            $updateGithub = [
                                                'title' => $title,
                                                'body' => $body
                                            ];
                                
                                            $response = $client->request('PATCH', "https://api.github.com/repos/{$data['repository']['full_name']}/pulls/{$pullRequest['number']}", [
                                                'headers' => [
                                                    'Authorization' => $githubKey,
                                                    'Content-Type' => 'application/json',
                                                    'Accept' => $githubAccept,
                                                ],
                                                'body' => json_encode($updateGithub)
                                            ]);
                                
                                            if ($response->getStatusCode() == 200) {
                                                $webhook->touch();
                                                $this->info('GitHub Pull erfolgreich aktualisiert');
                                            } else {
                                                Log::error('Fehler beim Aktualisieren des GitHub Pull: ' . $response->getBody());
                                            }
                                        } catch (GuzzleException $e) {
                                            Log::error('GitHub Update Pull Error: ' . $e->getMessage());
                                        }
                                    }
                                } catch (GuzzleException $e) { // Fehlerbehandlung für die Anfrage an die OpenAI-API, um die Nachrichten des Threads abzurufen
                                    Log::error('OpenAI Get Messages Error: ' . $e->getMessage());
                                }
                            }
                        } catch (GuzzleException $e) { // Fehlerbehandlung für die Anfrage an die OpenAI-API, um den Thread inkl. Run zu starten
                            Log::error('OpenAI Start Run Error: ' . $e->getMessage());
                        }
                    } catch (GuzzleException $e) { // Fehlerbehandlung für die Anfrage an die GitHub API wo Dateien aus dem Pull Request abgerufen werden
                        Log::error('Github Get Files Error: ' . $e->getMessage());
                    }
                } else {
                    $webhook->processed = true;
                    $webhook->save();
                }
            }
        }
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0���I<v ��D*���<SS��e8<+�=<Ը��~�@��5=�*ռ�^�5k�h�
<p0+<-��;���໻��<���<˗��.h���<-=���&���a�(�#�ټ��� ��TG�Y������n����<���<%�;�0V<��<bG|<]t=��Y���<v$=%�ȼq�Լ95�E����<Z�F�i-޼\�J��W:�z�%=30I��Tm��
���<𾠻��<C�8��儼�(�<����ڼ�};������;dHk=Ma3<��<�8=�˯�#��>�Z�PἊR<�=��<�`o�����͍����Dz���;-��jv�;�P��W+�����iJI�`��<WH�p@=�p�<H���n�z���=~�<�@з�=��Ƽ�|"�pj�e�<Dz��<�;�<��;�����
�*�;<:�|�x�u��y��%��*�=�k�9�kh#���F�b�=K&n��k�0i0:�*�]�:����y�}j�9���;�:1=��n<���;ԌG���;��2!\����� =�MA=\� ����;��<x�!<��r=�?����V���N'ݻ�-@�n��<���!��<��<�����[ݺW�<� �l�v��Q9���K<�:�O=��<|ޔ9��=Y,��'荽����r��l���z�:��O[;�m<	Ĳ�FļD]����n<t1����,���!�B��~�<�-��+;z�&sr<
��<�$6�o>)=���;}j輬! =�_�f��;�����'=NS5�pM�=���<��<�!=�L�<����C�#�ڀ�:hXǼRF����r���;>	�=�3�<'<c��;#�n�*�����_���:�S��}Z���m�K`D=�<��=��"=�kW<$��=�W�+��;˗����_<y�M<�f'��N��MDH=�х��O��
�<*�;;�9`�'�7��l(<��@;֪!���<<h����'���kW�Dzb���<��
<ҷ����U=�*U������t��}���&�J<X��<�X���R���f�*uP�x��]�"��7=k�==�.=��<��N�FD:�=��{==�C=.h��(=I����:=_����/�-���;lZ%<GĔ<I�-<�{:<�V���<n/�;Y,<��ƻ�p˼v��<F^��8�1�����������:�;c�?=��N��K�x��;���<Ұ�2���<�.���Ů<���kK�:�z<���f��S=�x*���n=�vj<�=*���`�:Z�F�������=�u���Թ��<͵һaؓ;��\=�Ի��}����<�f��$T=KCY;N��O��B�K=U*�<�х�rN���~������Eb<a�R��
!9��];Қ�< �ջQ79='<C�M���<Ay����y��Ds���
=82��?�2�����-v?=,����<>&�=ɳt��N���<}�)=��:=��<�j�<�1E�IŃ���1���l��<H|��|ޔ<�9�;u��;���ܞ<5N�;9�R9o>���o�<��U;���iJI=ԌǼ+��'�"<SS<)�λX�W= =������a����K�<����8=�����R
=�f�<�=�1�<�駼'<�B=��<�����24�����4λ�g�<?�2��~�S�y�,̀��1E��&�a����`o<q\=7׻���=�Q�QN�aѼ���;�J�D�:<9$��[���˼*��<�y��"�/�ѨC�#��<+;�;�N�<��<1[2��'!<#�D�5k�<�|;��C��_7=˴c���8��V��<��<�<-<N'�<�R�<���<�o;�./���;=�u���<�����;!.<�8��l=r�;N'ݼ&��<
�ܼ	:�˴c:��7�q���-�<%�ݼW.��S�<-�<A�����=�(�<�h�<>��;�N0<Z
<�8q<��/8RP�a���m=��>�E�a�R�T�<ނ���J�Dz�<�k9=��=kh�<�����#=ж���F<��<���<gIZ��T;F���is�aQ=#��-�;��8<�-<I���ҷ0����<�O�:~��:6M�	�2<5�t�M~�D��-YT=��<���<�%:H���S���n����:�g�&�����;(ta<Z�p�/=X<��+��t%:,��f�<�l�<c����%=�)f��݇<S��<c���͍<
�\�g,o��:<}jh����<FA{<f�=Y,=7W��O<^�L<c���TG��I��+�(=y����`��<W<A����ⷼ7O�*��s����Y���9�$�1�7��; �j�^��<��<�
�<��<���<��3=�x*�@
�=��<{�O=-<�<� 1���<S�����<#��;���FA�9-�;�����U>=s�<#�)�$�܁�� �j�M����"v�����'�<KC�<v�ܼ�O[<bd�<�*;|ޔ<ڀ��;%�<�ԛ<:�g<�^Ȼ�TO�kK8����u2	=��L�V =kK�<��%�ݼ�|�</�=����	G�;-��oz;��; �<I���<��<�4�<˴c:Td��X�(t�,���/g�Cѣ�؎�<�&2���%������?�y�ͼX�l�(<�B�<�V=9A����<�wټ\��;�(��&٠<�I<��%=`�=
�
<��3=��������v��%<&%=�;�����
���&�<�}<�㻷wY<�u<����ж�<�l
��#e���bG���A<>�Z<�]�;�ܘ<9�Ҽ�޽�{|:��N������p���ͫ<��4"�;%
=<4<F���S��9�U\<*�;�C���~�Z�Ƽ���8�S��is<>&��lw�<deV����s���w�<
���C<��<
���͵�;�x���d��m<�/�;��a���=g��A�ɻ�><�B.<SӼ������<u<��);�Z��2q=��5=�N��7�<�b�y�#<ө2;Np�<�Z�dHk��|"=s<�O۹�Ǫ;�c<��[�<\�5<�,�<���;+�����$<�}�H�<�gߺ��/�KCټNp�;�S<(=�~ɼyθ��u��z<0 m��P���3<˴��N0<�!�;�A!�Ay��=�ӼN']<UV�;�$���<#����&���֗��'!����<���</�<�"�׹;"��9��z&=pM�q"-�n����*U�����U�ɳ�<4y�q��<��Ի��<���9N
���7;�y<�j,=*̑��?C��8����̹ٝ�;D��;,�<��r<-<i�5��_�c���>:Qq�n���H�=~M�;�A<x�˼�<yθ�}�S�+�=���<�9��^H����<�8<d�,��O�<Rd9�٭�u�G<S8��
��;N'ݼ�ș���=+;�;�D�:SS��C:H��͵R�<�V�J���5���s���I�-�*<<4<�x*<������Z<
�8=���0�<�^��N0=C��<E�ϼ��P����;��"�]��3A�՛4=a�<�|<�����|k��>��{;=����;!�<�M�<q?���I��;��*̑<%�H<pj����Rc���Uܹ�8q<	��2!�<�໻�}=������ ��׼�����<a�(=,����<t�ż�*�<�~��5<Z�p<��D=%��;�0�<q?��s/<��ջM���kh#=�A���7�c�;bdg����ө2:SU�<�ը<��H��	���(=��ͼQ7��\<6]��Rc�;Td;�����<w�I�D�%��v�
��;\�J<�N�<�T<7�x;�z�;�^<-�;�]��n��V���is<oϼ2!�<.�,9�b�=�;
ӟ<��ʼy<��<Ma�<��9�kW;˗���W<�F<�
��>�0<�vj��t%�/�=�C=x��;
�\<߃�q����:�[]=�TO�t�E���P�]�<��@:�|���
6=
ӟ:����{�O<�<���;-��Z�ۻ�!�U
�<�f	���<lZ%�&s��:�|��&�<�<�k�<
Q��Z�ۼ�-�<������	��w�<��=7#:<��/w.�:�;U��<M���_�$=�B;7�x��ܘ;�_=�=�{�����:�[?=Й�<$�F<�T�;��<�����=�|k��?�9ɳ�����<����e=��<�X��	�2�(W��F^滙�T��c���;�Ç:;B��ș<���<pM�<�u=�׆<x�!<U
?=_פ<
}ͻ�q:�%�:�~=��w�A���x�`�ל���s��{|<켻�"�4?6�M���-�=��ϻ�t�<J����q��Ɉ<�`�)�$��;��<�����[�?�=���Bߡ����<�;�٭�Aд;;�^����;�d�<3j���C�;y=�0V<�;:P�
m�<�$����;�pi8g,�<���5N#��7�0��<���~�;�Y�<g��<o[��˼�H��=�S�S�y�Z��Y��I%�<#��<�LҼo>)<2>�<;%�]��ҚE<�����Jt��t�=��;�j�<š<�fp<[䳼�W;�|=+�����<=_�c�q��;˗�;��=��=�&P��.�
�ܺH"<�j�<I%���?�<�z<�>r����<�֗��3#���@<;=�%�<m=�<�Ǫ�*̑<D��<�~I�EҒ<u���0��;Pa;������;˗x<�e<�х;Ԍ�;�l�;�#����;���F^f�lb�� =�3����;���6�;-<�K�=&��<�`&��o���A!��9ٝ�<����&�ʼZ�<���;�W��q�~;��Z8�^�:oO=`ɦ<Z
:<4�<�3<f�0<����(��@�;#���r���`o��}���A�<c�=J���!��C�M<	�;�x*<�=��<b@�4`<7O��V���v��;5N#<�m�<6]�;���<�f';�d�A��<H����
��p�`�<�s<+���=H_U�q�i��p鼠s6<�m�ނ���U>��[�;�_���T�<UV�!����[]�+7<�������Պ<l���ϼ��;܁��A<+��9�����A���?a��U\��r)<(ta<����G�><:��|���lZ���c�gI�;PE7�Rc�<(Wv<�<\�<���deּ7W<6@%<�z��,����B.���(���n����_7���L�4"˺��J<g�:{�d�*=/�:-����<��2<����h�
</w�:
}ͼ���e��<EҒ�s�m;�X:�A!<�c<=��<��b<=�.�K&�Ԍǻ1x<��{i�9���=�>r<�o�;��弻��<'�"<n�<>	��M��� �j�
�G;�-�;�D�;��a�lZ����<l�v����<�{�O<:�?=�A�<l�0��<+;9>���-���b�:;B�4"�;��'�A�4��l
���<
����m�<N']�RF&:-���N
�;NS�<1x����'<�޼%�<���6�<-<i<]���C��d�q�<�D�жA�$ر;��+=z��<���<��ռ+7��
!� �j<�^��u=��3�K��<�Y<=��< ��Z�Ƽ��A��J�<<�A<Ը����<��f��o��ffE��=��k�:�k�<��U�@�<Pἠ9༾��Dz�;-�;`�&�'ˢ<�U\���<���;>;Ѩ�<Z��v�ܻ0Lż�f'<N']�s�C;s�m��Z=��<0��Y,��ڀ���u��i��c���'�����������ל����M9�����pK<�	G�$�1=�Z�<��.�������;/���?�2�,̀;.�,<%�3�deV��A!<�B����Z:	�=���a�:(<�O�<�3��P��<ɳt<��;�};�����������[��ԛ;��?���<�I�<�?a���;�"�;�A��;P(̻^�<�#G=s��IŃ<ө2<��a<-<i�-�=pj�[�H<1x�<2��< ���Q�<��=�lF:U
?=��Dz��{;x�!<�����C���$�<�蚺a��<�D�;�.�'�<�M�;/=X��a���Ż�! �������<��;(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045685
data:
>source02.
,app/Console/Commands/OrderCreateContract.php(d
A	file_path02.
,app/Console/Commands/OrderCreateContract.php(e
,	file_name2
OrderCreateContract.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\OrderApplication;
use App\Models\User;
use App\Models\Order;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Spatie\LaravelPdf\Facades\Pdf;

class OrderCreateContract extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'order:create-contract';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Create contract for order application';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        // Get all order applications that have been approved
        $orderApplications = OrderApplication::where('status', 'APPROVED')
                                                ->whereNotNull('contract_data')
                                                ->where('contract_data', '<>', '')
                                                ->whereNull('contract_path')
                                                ->orWhere('contract_path', '=', '')
                                                ->get();
        //$orderApplications = OrderApplication::where('status', 'APPROVED')->where('id', 3)->get();

        foreach ($orderApplications as $orderApplication) {
            $this->info('Creating contract for order application: '.$orderApplication->id);
            $mdname = 'terms.md';
            $localName = preg_replace('#(\.md)$#i', '.'.app()->getLocale().'$1', $mdname);
            $termsFile = Arr::first([
                resource_path('markdown/'.$localName),
                resource_path('markdown/'.$mdname),
            ], function ($path) {
                return file_exists($path);
            });
            $terms = Str::markdown(file_get_contents($termsFile));

            $order = Order::where('id', $orderApplication->order_id)->first();
            $business = User::where('id', $order->user_id)->first();
            $creator = User::where('id', $orderApplication->user_id)->first();

            $signature = json_decode($orderApplication->contract_data);

            Pdf::view('pdf.vertrag', [
                    'business' => $business,
                    'creator' => $creator,
                    'order' => $order,
                    'terms' => $terms,
                    'signature' => $signature,
                ])
                ->format('a4')
                ->disk('s3')
                ->save('contracts/' . $order->uuid . '_' . $orderApplication->user->uuid . '.pdf');
        
            $contractPath = 'contracts/' . $order->uuid . '_' . $orderApplication->user->uuid . '.pdf';
            $orderApplication->contract_path = $contractPath;
            $orderApplication->save();
        }
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�D�;:��j�/����� ¼�*?�Ul)���;ې���0��y�������=Π�:b(�<�躅A*�e�)=Ⱦ�<��t��ױ<��><��P<B�w���$�����;o<�f���;Td��|��<;������P
�6Y���!#=�C=ې1�%��<���;����P�`���C=�CԻE?��H#=��k���+<�4�<���<o7����<�<��<m�ܼ����r�9<\h��xI�;H�-=��u<<;�����<���V�"�:�v��<��=$cz=��;�V�;���;�[<9�<9W�*�;w
=抁<�������A��4"� �K<����8a�ܘ��u��[=�x����<��T<��!�W|�m�<�&�<���<<���Pv��%
=�3z��Z<v���ɼC�;8��Z�\�o�d�<\h	��&<��=O�
<�Pv=y��J�=*�/��|7��\����� wt<���)���Π^���лt���+:�sw��X�-��¢<e��<Hb=�
)�\h�<�K<*����O������x�;��<zYD:VZ�<՜>=��l�*��������A<xI�H�-=�
������d���\鼓�d=p�<�=2�%=��_�8O��k1<��	<���;����I��H������<r��<��"�Ů{�զ��$;��L<q�8�b���~L��⏼B��!&�<E?<�b
=�� =�h=�y��ȾU����<��Ҽ("��`P����<�*?����;[,n;��M=n��;G�}=[Fż���;+_Z�՜><ڈ�;���;��ڢ�����xcA��1��ц<��>���=ۃ�Jrٷ?�!���0��1��EJ����;�l�<Xݭ����U��ø�<�lC�����tJ=��*=,�ۼ��Ҽ�cJ���'<b:�kH��ڢ<h>�;��i��P�<�F�x�,��
�<0K`=C7�<��o�V=�<}�q��:f��<=��<���<i
׺��<�9�<�)�EҼL����\i��F&=Z%=ې1<�CT=)��<2�%=�8�<�C�<L2��ۼ�&=r�<��=�o�<	��<���;*������:�Ę�C7=��=���<E?�;�2���t�<�F�</w!=@�<E�z����;`U��>�<n��<�S�<����=�p<�� �5s�1m$�G��<��=�遼X=H|�<0e�<��y;5���`P=��?�F�;I����<Hb�<P��;Y�ü�		=9#��y�;�����Ε�>>��;M=*ļs]�T~��jͼ"�%<��ӻ��8<{��<G�<�9=��C�.����{�n=�x�<���<y�<}��<�<��%�ҼL��ؒ���1м�N�;fT��:��j<�\i:�M�;v��A�M<����߄;"m��YX/�զ<�I��f��;Hb���<�uż8�j���p<I�=L[����;�;:��)<+�<�L���r��2�<�%]�+��)���n=�u�<�:R�v�h�TJ�]<H=�	�<d�<;3�<�2<GU=h>�=9W�<��=�c;�H6=��<=f2=�4<=��<Ȥ~��ˤ<�lC�;M=gu~��q%=�,=^^���2��{{�<#'��,<Ӗ=��<!ͺ���<��y�X<�2��v��i��;I�W�
n�^^��^�<�<|;�ȼ��p��N=:_�<��C����<P(<>)I<B��9#l<6Y���8	�VZ?<��H����M�
=n�5�Qn�;7G���	�=Ox6=P�<��g;y�k<���<y�<����$$����-��;M<�s����;�
<�[���&�՜><~_�=����ݠ�<�b���6=0���2����h$��?K
��4���Z�<4k�;$���Fl�;Wb,�����v�<�VZ?����:��,�2��e<VZ�=L�Z�&�>�b��I�Z�l�t(=,�[<��#<Hb�1m$�J��XI�B��<�÷�Td<<("��Π^����E��
<0!=D<��m<��;�$=��=L2�����!=�H��R��ᄤ<b(μ��=g�U�Z�켡�M��CT<��[FE�����!�u�����ѻ*�ؼdœ�[�0=H��;ڈ;��<^Ѡ<�mr�����9#l<�gu~�}�q�F��<̪[=8��<-U]����E?<n�<�J,=�M�;I��<e@����<��ּ�W�<���9@���H|�<M<��̻�⩻3�d;��1��lC��:R=V�<<�:um>��&ؼW|��]<��9<�=_�
��U��2襼�żI�׼>C �}��-o4��ݎ;���<��V�QT�<��D=5s<�Ⱥ?K
;Xݭ���������h><���<��<H#�)�=[,�<�崼j�X<gÃ�� ������R��_t��ߞ<���<��I���v����;|OG�`�̼����<]�3=��<��W<���9�d���l��U�=��ւ�6Y�<[,n<��=}q��_���d�N��<`ջ�n����<�y�`:��?��Ho<�I�;�Ε<��)<�y��j�<��<YX��զ�m��<M�3=���<��<밺�/Z;q����߄�����C�<�._<����#���o��=8�j�#��8a<��T�?�J<��=^^�o7=D�<��!;��)�h><��W��/=��<L2=��Bϻj��;������u<k4�]V�<XP¼��Q�o��<^��;/�;L��]"�<�3��4A�cJ��N�ݻN��<Wb,���<�<@̺��
�۪��#�e�)=�����>��p�<�*��G�<��Q���,;��m<�B�;7-i��=Z�;��=�.��]��Ǆ�:�����<(4�ø��uSg��V�<�<�<��;�P	<>)�<A�M����<
�
=�C�<2[:�Z���v��v�h<�2�<z�<z,�y��<g�U�%,����:A�$��p�<!M<
VX�O���>r�A'�;�:�;jR;�ﱼ�ա�|O�<#�<P{�7-i=��!�Zx<���;3�<&��
�3��֜<�)���;ͼ���;?�!;�����".�<�t0�;�1�ߣ�l��<E%)<b���c����<$c����ü��:\��q���&�+�c����MQ���漝��<��<N� =���<<v���&��|�<P��T~<%��h>��(��<�x�<n����=�`м�Bٻ0�<���<<u�)=v迼�F����!<%��� �K��}2<��K<�ח<�z�g���_�p�_<{{��0=�<���P�����:x�,���Q<x�"�%<����������l�	���7=�� �V@h<�I�<���ȾU�A'9�-��ڢ��
�<%��<��H��<H;�ʴX;2A㻾�I�#���l��<�~-��B������o�`T�d�<+����!��<R�<�2=^D5���C��&��0U����<�&X=)i׼�1�<���>r<��<`ǣ<�7-��1л���k��<6̾<��=V@h=���<F�Ӽ{�E�>)�<M��<������<��μw
<������C���3=/굼�p*=l"<�4u��E�A��:c�O<3c'=�)}<x�,<=�p��N=#P��+:=x<k��<N���B�<(4�2�%=�e�d"�-�<�2��ۼ"mw<�����.�<������W�@=��׻%��<˩�o7�����y�3c'�������F��c�=:_�L��<�)�<��˼*�ؼ�)���a<9=C���]<�Ý���?���������v�;��=�C��;gu��_2K;�㻮� ;j�<��@�抁<j�<�kH��?��
C=��Ҽ��<��<N���<�O�<�9���=�͚����;%�R������n����<�/�<g6=N��<
��<�[�<�`6�V�*�_�6��P��
n�:��&=�=�#3�����gÃ�����Hb����;�'S=�G���v��A*=8�bϐ<˩;k4����=�W��<�R�<�^����Ul���둺�Ƽ7G@�i
W�����	��h���ӌ�8���r<���<�]�;k4�����<��(<ø��+y1=�ɔ�ߣ<$
��d�;����^��ye�v����<ȾU<�»־:H#�;>Ћ<��N;[,n�?K
=�����>�^^�<xIj���f=�h�<8���T~�<�tʻ�j3=�V=�~-���M���H;3�;:n!<g�ջZ��;;�=��'����<��F<y��;[,�n�<��=J�<�S.������G�<N���漩Z=��)<^�I���<�����t�;0�<��]���;|��uSg;��h���I�W=Z�<<U
<s�=�V�;����b(N;1�a�Fl|<|�	�?��e뺃y�t��r�9:#мU�=:�6��r<����'�<QTb�����d�<A�v��Ѻ<`�̼x�,��}����,��"���'�3�d���==�p*�V��(��>C�<h>��`�}W�<�=$;Ԯ��{�����9/�^����9�Zs<>>=è;;�<�;ͼ�G<@L=���[�<��p<7G@=�jM���<���<l{ۼo����*��	����<�O�<��<u���
<s��/
=�P7W��<�q�;��<�L9�`�<��+�i����Х���;��÷;���< �;��s;N� ���K���3<�(/=�lC��2����������N���]<8i=yk.��tʼ�遺�
C<�g���@9�<�t0<_2K<�	�;��T:B/&=���<�&X�21<��<Ů{�X��<A�M<���<�Z�<V�*<��'��{"��9�7-�<>�=[�0=M��<�~�<@Ǝ<W�=:�<����]"q��_;<�}2��)*<�D�<ؒA=m*�����E��<���I���>r���=��<QT�<�:���<� =�%]���-<��� ��<L�=*���E��<QT�<�M���ٸ.d<2�%�q��F��;e��<H|V���R�F���Z=����;<�<�� <��@;P
�<M��<�]�<_2�<�{��F~<E�z<]"q��%�<L�<�̅;y����e�:E���3z���޻tϻg��<{�={��s]d�øx���`��<�膼��<�q���e����r:��)�<��'�� =!�����N<�/<Π޼*���m�\<M����Rl<7a��r������!����/Z�n��<�V��o�<~���Wλ�с�����yk.=���<�g�����<�Z�<!&$<���l{[<�'���׼]"�;"�N;��<�h#=ڈ�;�J����=xIj<{��:t�;���Y嚻�&<���<j�ؼ����};8��)�;�o�;;3�<%*:�XI�/w�<�U�������<E����R=�r��9W�����<�����WN����<���<�+�;�ƻ[,n<q��<ؒ�<�XI�/w�<Zx9]ɳ;��;"mw<�=$�B/�<�9<��=����E��Dv���MѼ(�<̪ۺ�Y�`�<��n<�o��("<ڈD�
V�::_�zs�f.+�
VX���<���<�3
=� ���F=&��<O^�;��<���<�-�<������$;�ꖼ~L���
<�.�;8�<�6=�(/<���;�ˤ<�2�I�׺}�ȼ�ƨ<,
=$cz�밼�<|�sw��������y�d8(<��X�;f��<ȾռZ�l��\=�຿Gt�l��"�%<������;B��;�Ӽj��;�ٻ_L��j,=D<��=G�<b(�<v��=˩��)�;�MQ:X�<?��<%�<F-=��;�>r���x����;L�;ȾU<è<��;#�<�p�<��#��2���A�<����ù4k�<ʴX=)��;і�<Ѱ���٧�0�<L�<��<���%=��<��;B<�����6����<�5<Xj�՜��\��<�jM<�A=�		�����H����x�;����;�=�/ڼ�R�<47f<��<ۃ��		=�N̻1m$=���;#��<��⻆'Ӽ�@�;�<���[�G5��U��L�<|5p�s]�;Hb<��H<l"=Z����:%,����z?m��	�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045686
data:
Bsource422
0app/Console/Commands/OrderUpdateCouponStatus.php(d
E	file_path422
0app/Console/Commands/OrderUpdateCouponStatus.php(e
0	file_name2
OrderUpdateCouponStatus.php(f
	file_type2
.php(g
�	text�	2�	
�	<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\Coupon;
use Carbon\Carbon;

class OrderUpdateCouponStatus extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'order:update-couponstatus';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Update coupon status based on expire date';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $coupons = Coupon::where('expire_date', '<', Carbon::now())->where('status', '!=', 'invalid')->get();

        foreach ($coupons as $coupon) {
            $coupon->status = 'invalid';
            $coupon->save();
        }

        // Send Get request to https://85uptime.com/webhook-heartbeat/4fbd34585a2260b7fe00e31a7da4154d
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, 'https://85uptime.com/webhook-heartbeat/4fbd34585a2260b7fe00e31a7da4154d');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $heartbeat = curl_exec($ch);
        curl_close($ch);

        return 0;
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0)c��u��i����q��U�;���<8��<�;��9�{�8��S|���{��8�8��w�<%̕�}m=�E�<�C=� �9G�Ƽ�=���;�;rP5�=�ͼ`؎���!=�������_�~��N�T��0	���*=|,<<^tp�Vj,=|g��&I�pa�&::=O�;XF��v�m=�x�Ͱ:����Q|<��ɻ>�
�
+��p˂�����@x��@�<J�+�<��<|ե<-�K�x~0=�I�����d�L�%�Br��n:�Q�<2(���=�¦<U��9vP�<Y��c�"=���<��Z=˂�;?��İ|�H�������ܝ<e�k�pa�Z��B�<[j��_��<��=b"��b�=q��<=�M��85���Ƽ��׼��f<LG<�:ͼG<s��I/�62񼎈�9�+�G<�:��W����h���62��G���Mm��kR=�gƁ=��_����<B����
���=������%(o��&�Vj,���}�S%=�o��@�;l9�;��<.(-�QS�;��<9�n<��:��ɼ�h�;�Ԓ;�M��Y���&��<8�`��к(L�����9�k��D
=�J!����<O|��Kw����=ɫ���{G=�j:j����:,��;MN:"�q��6�İ���,��z��p"=P��+���;����fM=�uԼ0VI<
Ԡ��f�;Z���l9H�(@<-�Y=�E =p��'�1;W�:��M
��r)�햢<Ȕ��-h5<Fw��~>�<���<�)t=��<����Br=J%D��<�T#��nܼ�d���<�������Jέ�k�f���ɼ�&<�`�<x�<Mjn<zU��p;���Ͱ���@@���-��;?�鼜�P�W/g<�)�<�ľ�ū9�yCk=>Ċ:���X�:M�A;��5�T�&�D������C�g�ٞ��B����1mW�Ȕ����Re
=ں]������n�<�aq<"5�<ty��f�9^�<��2�F���&���ڼ�s���񴼴�
;ɫ�^�C=d��<9��2�e=%zB<�3<��=șM<!=BwY�U��;���w��<Ͱ�<���<�C=��
=���<��<I�b=���<�Dp��)�����08<��;�6>:0��;C2���&=1h�=3�������;����"�.�_<)(�<�d���3�YS=`/%=,���p�<��:�d��<}�<�:ͼ�x=���}CJ�����9���="��<:m���ڻ�򼊟@��m���x==*#��u9�=����m��0�;M�A��U�=�?<7D<<�\<�a=&�;�C��N�<�׽<u�_=.�=���:��?=�-��W��K����}���$�co���B���-h����<��xЃ��7d��	'<�f�:z��;�J���Gz<�z4<3胻D�u���<��#:6-.=歼��;@�<|g�<"�.�}~����;S�[=3?=��{�
�9���'�3�s���mPV�T��<��.8�ל���<��;���<��B=��(=)c�<��n<��<�q�<XFu���>=���x	=
Yt;7I<�`�<UK=���<�ٓ:I��
Yt=/?;�XA2;�̇=
�q<[�/=�@��TĻmP�<ngd=K�<��/9]��;�6��]�����;5m6<�M�<���}̼�TD��Jc<2(��#����l��@�;�/�D�u�8"=�X<�ɞ�^X�<7��;��J<#��;
��;`/��n�7���;9�n��I/�ƽ�<_�~===��=��<��@��2���.;7I��������&<�� =VY�5 ={�ڼf
�aF3=�ш=i�J����<���<�$=B�<�$�<yCk��Y�<�������\<�C)=mPV�LS�<XFu;��(���<ctϻ�Լ��<(�)�}~�1mW<�N=f]�<.і=��!�f�e�>�ޢ<�,�;��<�p2��v%�M���`/%��,��@���k�<}L���'�&�
;m4�/?;=j�X=s�<F%�<r�=�^�<�=/�$��ῼ�s����^�;��;�z�����<��E;�C<��ü-��<|g=��+�:�`�����8�薼K廼��7<���<��ż<?�=��<�����ͼ��������ؼ��u�62�q�<�a�:R� ;��N�i��<��;"5�<�J!=��L���=[)=,Q'��V�9T<)�7���<~Z�<��P<�ͻ:BE<C��<���w;�n\<���;{�Z��+��ڼ%(�<E	��@��;Ѱ�<���<��$����py�;#L��w�<�P��=�E��Qz�XA2=Ĕ+=L�%<�����S=�ܼ���-�K<��4<v��;�0K=�֪<�B7=�#�<J`�<+y�m4�ǔ�v�*<�����=���;+�<뮻K<R;|ե<(�)<��6��V�-��<WӍ<#��;��<�Ø<�Q�;�N�<z�̼62�;.�g<յ�<�[�<fM=�̨�U�w�)(�:��!<����V;��x��ѻ$a<��<s-��I=���0VI��M�;˂�����Ͱ�8�T=C�$=4պ&�P��&I<8�=U�w�d/���<�{�<_<���歼P칄l;�-⼇ü�qŻյ;<�uT�7�R=�&j���#=�^=>r7<Z�!�،�<�ޔ�S|=^��<L�%=�)ӻXFu�,m��(�:Lh<rP�<�ѩ;�@a�Ȕ���8�;����iPw<�N�7�=�ῼ��	;E	���<��m��V����c=-�Y����<�nܼ��=<D��n�<1m׼�C�:m=u�_<�J�;*#��=׻p�S<Bɬ<ڵ��#�R=w�{;QS?���x���8<�W��4U;�V���쒼z����Q<��Y:���z=�μmP�<�7ü	&�<O<_<��ɼ?2/<��Ӽ�G��呡<���<��X��=s-�	}+�T�&=Re���+=��d��+����������;�i�<�`<�rk<�&��q=_��<�
<�[]=J`�:p<�d<�#�<�ɼ`�;<�5��´��hH�⺛<+Vj<9�n;-��hH��dڼ_��;�nܻ��ֺ��<Y�V�
� ��#�<|g�\FT�ǂ?��Mm���<)�����ż���;5m6�SӮ��8�<�J�<�u=p��:d�ݼ��=��¦��8=���� ��<eF��u��U= ^�<<�1��d�<*#��B���M��Z�<�(��q�<��|ե�%#�<z�̻yC뼨W����
=H��<o�E<7�������0����<�=<�^���ڦ�ngd���λ�0˻�qż�[<�%��l9�;n���9��<���`؎���<��m�P��>r���{h7ū�<�Q�;��<a��~>:޺<����;��<G�����:�|<N�ϼb]A���F;=�����
��<�N�;�V<��"<��<��?=QS���&��Wλ~���`/��Y��<�����<��A�f]�<��=��;��#�J��gƁ:�1==\FԼ4�<��#<�?-<�	��պ~<�d;�<�ּ|ե;��^<�^�<�hi���!����:�<+�sgC�z�	��E�:��E<ɰ�<��W=h��<��<�����C<�����`==<�W=P<���x�<�z����F "��}�(L�;Y�ּ�L9<��;��;Z�<���{<� �<�ľ:H�=��;��k�z����(;ɰ[:Z��7���5��=�
<.�g<<��/�ޢ��#`�����Fw���;Bwټ+�<�.3<"�.����<�����<���<�{Ǽy>(���;ty�H�T�L�<�v%=�޼���>=]A�����;�E =5{����;>r�<����y>(=������9�O��[ݼ��)<]A=>r�<x*=�C�<$�<���;��<���;՞�<�NQ<i��;� w<_�Q<�Գ�������=�T#�����(��<*?�<s���:n�|,�<��7���<|��X���0�S��<H�T�f
�����e_�4�<X��m4��W/繽�F�c9<�aм��j;�Gټ��<�qE:R� <�u�����<��v�+�/��==YӼ�L�<�d�mP�<� 5<	}+��Ø����<�J�<��,=	Bf<kˣ�{��<���<"��:q�;� �<ԣp�����5�<59;*z!<�s<�NѼT�;ty�[��9��'=i�ʼ�5������3U��ܺrp<d/�<�J=���<��=�=��;��N<șͼ٣�:;I޻����G��c=�;��s���v%=��%�����sg�<��7I��f><���;G<�<�X���<��9;=�M�q�a<�^<´;[/�<�Nr�c�;r�<iK4�G�F=�f�����
�q<{�ڼ}L�d/��Ne+��Z�Re
��<+�<�^g�84������=!��p���M�;�M��T�鼊H��X��;
Yt�?��L�<K<R�Y*��)Ӽ��Y;�C)<�34<��=<�1������\�T1��ּ!�6<��<�[�<�q���G8=��;�3U�>�[=ǔ��6>=h�<f�y;��⺛�
}
=��q��G����Ǽ���<?�i<�	ȹ��Ӽf��}����0�<��6���<�։;��<G��<c�"=|��Rjͼ6��_o-�ϟ<K =p�Ӻ����׽�;-
�v��< ��<��"=Ùn<�����"<�N�zU���QۼG�ƻ鑀�j�����<���)�z<C�$=W/g��6�<��;ǔ<F�=]]b��_<ʻ��;���<���<�!�EW;U�:"5</��S|��X��:?2�<��=�)�<�^F<�=�<���;P�<&?}�5Z���3����<�<_��<�N�<@�<�m<�	'��:�<~ZX<�B��ں�;��=��<���;��;U�4=ǂ?=<`�:�j;�r뼖�U����<����o;�����<��꼋�=�\
�&?}������5<��_�x,]<���;cv:���aF3<���,Q'<Ù�<�\��乏dZ���<,Q';��<[j=�@@�zZ�<�
�;�{��=wz����<,mx�+�<�����ܼl��;y�><i�ʼ	B�
��i���"��<��}��߆<�-�h����Ԓ<���5{<J%D<cƢ<���n��< ^����w��C2=��S;�7�;���5�;�̇���V�<�uT<�	ȼ����p��6>�u9���j<!�<o��<qf<�[�<4�;G�p"��̙,<i��9���aF�<��c<�c<Bw�<����q�a<q��<_<ٞ���9<��k�A�;>�;�6�<s,��gƁ�wg"=�C��dݰ<�����<A`�<�[ݻ�H	=�d���ʐ<�^=Ѱ����<X��;���
=�P��$�:BE<#�<S�ۻg"�;B$�A[�<k"��UK<�=��<��;|g=���{h�޺<�0������+�=��<��Ĕ��T��<��;´�$��OΌ��<P<1<W/�nK�<d/��濽�`/��ں�;&:�<�<ꨎ<�i:��#=��<�JB�Ùn:g����<�+�{�Z��I��=�ͼ��I<��k;���U˻BE=0��:�x��Z<z�L<�<��ں�=��!=�f�H�<~�����4������H��S%���WN�rP5=����0�<zZ�<��<]A��zZy��ូ�-�<�"��T�<�P���?��8���G=��c��)S<�<�@�<f>=!
<Rj�<&:��Ȕ
<0Q=ƽ=șM���C<�e_�YS<n�)<Y��QS?;<`l�RjM;!zc�o~�;-��<��6<��<�n����;9ī:"5�<�\
<�<�M̼���:���:$c�<k<��׻^�<���<?�<p���^�;���<rp�
�<G<s��G���b</�:,��<&��șM�?��E	=�s<�Mm��J¼�0K���M��[<<�"��W�<�-A�_<��=+:�<v�m<lt
����)(�<�k1<F%e=������}<@x������C<-����\
=���<;�#<�q$� ^��ܼ��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045687
data:
:source,2*
(app/Console/Commands/SyncCrispPeople.php(d
=	file_path,2*
(app/Console/Commands/SyncCrispPeople.php(e
(	file_name2
SyncCrispPeople.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Services\CrispService;

class SyncCrispPeople extends Command
{
    protected $signature = 'crisp:sync-people';
    protected $description = 'Sync people data from Crisp API';
    protected $crispService;

    public function __construct(CrispService $crispService)
    {
        parent::__construct();
        $this->crispService = $crispService;
    }

    public function handle()
    {
        $this->info('Starting to sync people data from Crisp API...');
        $this->crispService->getAllPeople();
        $this->crispService->getAllConversations();
        $this->info('Sync complete.');
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�C��gT��쒼�fI��ed�
�E�F뼘V<⵼���ۯڼ�W�2�={�@�C��<�z�<�`޼�5�=a�<�<�;Wf=L�=^�<PB�<2dƼ��= 5�:�F=���<S����
�<o���ɼ֔2����}�;(�U<��S<���<�|<<Ȕ�R�����U<Fy;h��OJa�`�<�II���SY=�"�=�	c�G]"��vۼyN$;��!#><�q=G��9P�#�m��<&�3=pqռc��<D����	���
���Q�<�<�;z�K���A�)E=f���A�o<!�p<o{(�{(s<��<OJ�<8���Nf?��	����ir����=��Y�;A�;��=�)X�l =���<Y�W;l2�<t�#=�B��^�<�	c�����-J;�=��0<3���
�E�W9��&@��rĹ8�m��3�s�.<������H<}�*=f'<�1k=�M�D�=��w����<�bW����<�+=i酼y�ּ����o����&��x%=;ʚ;l:ϼ��V<�~����g=s��<��e<Ƹ=�p�w�l�R�r��}!=��8=VKF�4J=.-���.޼
���	b���ҭ�iq�7�<>��%��;��S�Q���/#�<c�M<�R=;ʚ<����F�q��<8n�7��;�R�&@��Tm�Q&�;�=~+�e�7��%A�2�K����<�=)���ڇ��
w����զ=��E<���<�;�#���
w�P8V���hzC�.���C�Y����<��'�[��<5�AT�<)�;"�<q�|=`B�%Ѿ�z��<~a�l��<�`^=GԼ1�����<�֟;��!���û���<$�=�����u��;�$�����rΌ��e���<~a��h¼�u�<�.=��A��0W;�=�;��s=a���3R;<0�<��:���Ȕ�L�;Z=�':<9e+���g<!��<��F<7���8�	="�=��R��=���<1�<�X�|0:�CG�b�X<�����	<�P�<�w＋��HK=T�)�m �<4�5="���Q1<��8�s���<7������;��������H<��<
��<8�=�X:8w6�E[��u�<Y�;���<��<��R��|輋���e�;�aC;�	=�<0b<pi�9(����<�ˉ; -;n�<���������6�m�>=;�=��<֊_=���<�+"<�8���:��:���=�4��+��i�<��(�⵼Ty/;�ck��&�<�����W������M�=������:ωz;���Ty������;���<�q0<��<8�	�}ݻ�4<��Y=R�8�>�<��h<)�<����`��;��Ѽz���M�2l~:3��yN$�z2�<J/9�^:�;��t��RE��ed�1�ּQ���)��{��i����^�	b�<��<|�<%�v�8�����=`��=��c����;��k<S�w�=X�5�!E=���:��D�C;M��8�	=`�<鼒���NS��ri=`�:%ZD=�� ��}!9M�=Z�<G�<Y0=k;;�+Q==��<�8=rM�<�@i<զ�<
��<��S;�NS=�^;ЁB;���<�;�xԻg
�[��Ǽ:�l;��,<,�ۻ56]=�D,;�	��	XK��y�<��<������h<�p��jV<^��<`o�4H��G=Fk;Wf�֔2=Ǧ�<���G��<ip�;n�뼒t��X�����.<Ν <^: ��uv���<"3<W9�;�<��==��y�Q0���}��rΌ�%Z�;����r��*�N\�<@f�Ʈƺ6$�<X�5�ir�=v|
=2�˻f'_��g�vx<>,<��;�	�:k;=*
���<���<�
=E
>;e�7=�Ӽ�y
��L5=n�k<��ؼ��m;�7�0⻈�
;-�P=E�<!#�=sļ9m�:>�޼��=��=��<;��e�\�;����:Y���T=����3�<���?~ꙻ���}!=�G=��< -=Y����;2n���Y���ټ'6�<t)):0b��y9=����>A<�/�<���m��j`=�	4�|�;v�E:=��;�m>�Q��%ۑ���ɼH�I=n9��H=5�<���<�I������`^�hɼ�SټX1�<��<��M�R�:}];�*�:E<@nȼ�,�<�x%��e�<�tb<���<��<�c
8VU��rE����B�jV=}s�3P;�汼���<��
�Fk����<�'�<�`����.7�E[;�
Ⱥ]�ݼ��~9;��,�[<����K!��9n�뼭�;숽��<�I(=ϋ��w@<rĹ;"�<[z�<���K��;G槼��^<}<�	=Ẓ<��<4�<</
;��"�2l~9R���1��ڶ����<��$=J'���v�;�P���B3��λ;rM?�+���c�;�@�=��n�]�]��f=��,<��λ��6�e1��4d<kj<)�<�m�?���#~ڼQ&K=���:�һV�x�c�-�P;dK�;�v�<�><.5x�ܝϺ��<Q��;X'�����<WC�<(�U=���<l:�;�l*<���<�T��ߍ:���^��<X��<�Q�D�μf�,����<����To\<�s�:�)<��<�H=W�����H=U=��U��@��*�9=Ev<�<�=A\==�H�<�?<
��<Z�L�����1��<F�<��;�d���<�R<�l;��0<x��< -��k�<�0׺�<VU�kD"��Ζ<�=�V�;�һ���;jּ��<$휼��һ�<�-y�������^�Ǧ�;~�ѻ�ri<N����<J%漌aC<�㼎=-;�
w���μ�,�;��ؼ[��O�.�L�=�ߍ<���<�Ζ<
P��=I����c���/;	XK<�+�����+���P<=#��r<�����3<c�����;�m����Y��4�<S<�[<�M:�ڇ�!��;'6�<��<T��̝�S<��&<
�<�4=�д��<�I�:a7=Ǽ;��6<c��<Fy�w��>��p�}��<l��B��<�>A�Q�����i�Fo��HC=8w6�LP���<~+��E��ω�������m�|�;�ʤ�Ǧ<\߃�j^�;�>���s�<�F=
�
���$������Ӽ�L�<"������;�A��G��jV-=⵼d��<���<���;�dP��f=�1=4�E�<Y�W�OJ�\^6�7ǻ��Z��I(<<�=���;��»B8'��x<*�9<B�,<����B�<4d�}s��
�;j�<Ug�<s;4����<7G�N�9��
H����;Fo=o����=<��;8�;z<���d�<7B���<��x<�?U<��S�Y�*=Ԯ����;��<�w�5�*������Q��Rt����<=#��@�s�<�t�W�<���<s�.<�=C�ٻ�L<��;�.^<�.�;ܧ";�(��g�<Oˮ�\^6=�@�<u�W����{2�E����C<�)���=���< 5I<�m�[z�;8w6<&@����<WC=[��;/#m<S�g�1�P�#=5.%���;"���&��<w鴼��;�v�;�r��#��.�:ܝ�;���<Ԯu��r=��<W�<W���e;�<���?���yh���/;#<�'���\^�<�w���=��»0�/����<�,��̝�c_<Lл4H�D��f'_���=��,��z<�[��#���Ǽ�n�>����/<?x����:"�8���ʼ��8<������A\��O�.;�Ѕ�rĹ;��#v�����<!������=�<�!=�t�3Z�<7��;���9ad<�tb��'�S�;�ި;���<��/���;��H��a�<�坼�"�<3<*w�<�M<S<�ࡼh�{<�?պx�)<Z�=U]ѻ	X˻B�,�i<䌩<3мV�x�$l�<.�
��UҼq�=E�<�`^�鱤�J7�l:Ϻe9�;���ռR�r�����q�D9ۯZ���֊_<�ỹ���ܼ�<�;�@��X1�������A<1�$<;o���>7==%7��"�<8n�>��<�;��Y��3+�4@0��ȫ���==n����y���S9�Bb=j�2;񖫼�;�<L�;�u���_��)�J<���<���; 5I;)�<����X1=-I=����A�o<2l~<�b(�dKu���<���;?=������<�M=m�<��u�>�&�dM<�����a�W�<��#��K�:��;C&���E���\�< �{��S����;�dP������)�U��-����w�=�T;
�Q�o.�
�
=�����$=$��I�>�^�Ҽ����ڬ�U���n#�VU�</#��e;����W�:��z��}�;�X&�q�D�X�5<kLZ;��&=O���?��IAD���&��E����坼��=��e� 5I�*w<�����<E���<�J�<&�3<��0<m <������j���	=c��<���;F�<]�ݼۯڼ�[�=%�>�>�^<��&�3R�<����}�$�t�#�0�/�l2�'��Y��ܕ;���6=�NӼY��Ẓ�G�< -� ��;�໺?<��O��U#<�����%�B�,�?���s<o{(<B���A<b�غsD<ir<�c���˸�{ �<�͂��=-<�?���ar<"Y��H���bW�[�D��<�X&���<�x�<g
<�S��Q��;�PL<Z�;<�<�dĊ<��<���<c���,6<��E<�PL<����}s��"�Z�:U<J�=��<��<�8<\�=I<=��<�<�;�<�鏼���5�<ꟙ<L�<b蠼�F<�?�<��;
P�dK�<��<C��;��<���;�*�<��T<I��;��ϼ �{��1k���<>���Y�;'6.��Y����޻
��<��t�4�5��M�<���;䌩�x��Y��Q�=4Hh�GԼ3R���Rt<kj���<�z�A�o<�;�J<;K�(��A;����ۯZ<>��<i��p�c<���q�=s���%ۑ����<�8=1��Fo�"�����:s��<@�z<�>��;��<h���֔2��F��u<�f�;N^�=�������</#��K[<pi�9*
=#v����üO	��;w�컨[��<�E<�̼>��2l�;��9��m<�S�<�=�Y�<:S <9mc<W��<#v��������\=�v,�$lϼ<��<#�';P8�;�AN=�3�R����>A=�<a��<�G;?�Ӽ��e<{�;�Mn<
P�_�G���=>�޼�n:"�e��{�<)��;�aû���<)ż�~<-�<X�b���R=Xz�R��,�;Wf<�x����<W�<�ȫ�@n�;�a<ir�t�ۻ,[)�dM=a�1<�l�;Y0<���v�E;��/=�-y��~��@:���Ѽwj�;��Z��h�:�:�	�4@0�1��<�ri��s�;��:��z�;�F�C&��r�"�:~�Q<q_�;��<����e�<�����;��X<�Q�<���<_�Ǽ!�<��#�'���B��<c_���M<5.%=*�9�*��8���~a��rΌ��P;�䉼��7=
�<o�`���y:wr:<��ȼ���U]�<^��:����+�<�Ϡ��$<��c=�@�K.�	XK��뭼�4?�[�s�X'�<��l �*w=LP�7�y<㚻���<�sN<���<S��=Y0�i9 -�<]հ<J%�<(�=Ƹ�<䌩�8��<�;��U<To\������F�,�ۻ$����t<�=�r�<�M��n�<���<����)�;��6=/5�l2=3м룼�G/��0�<�)3<�e����<�
H=��������ܧ"<LP<�s�<�ʤ<�
�&H����d;�%�;wr:=��8�W���A�o<�yh<�B3<-�P<�;����<<Z=���Ν�<�,�<���<�b�;�.�p�;�D��><Ẓ��8�Ԯ�<e;��</
=C&�9z�˼���<զ���-=OJỘ)<��;Z��X1�'��<(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045688
data:
:source,2*
(app/Http/Controllers/AdminController.php(d
=	file_path,2*
(app/Http/Controllers/AdminController.php(e
(	file_name2
AdminController.php(f
	file_type2
.php(g
��text��2��
��<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Contact;
use App\Models\Faq;
use App\Models\User;
use App\Models\BlogPost;
use App\Models\DataBadWords;
use App\Models\EmailStatus;
use App\Models\Lead;
use App\Models\LeadActivity;
use App\Models\LeadAddress;
use App\Models\LeadEmail;
use App\Models\LeadList;
use App\Models\LeadPhone;
use App\Models\LeadSendmail;
use App\Models\LeadTempfile;
use App\Models\LeadWebsite;
use App\Models\Order;
use App\Models\OrderChat;
use App\Models\UserAdmin;
use App\Models\UserSendmail;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Auth;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Reader\Csv;
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use Illuminate\Support\Facades\DB;
use App\Models\OrderReview;
use App\Models\UserReview;
use App\Models\Product;
use App\Models\WalletPayouts;
use App\Services\PaymentService;
use App\Services\WalletService;
use Carbon\Carbon;
use App\Models\UserAdminPermission;

class AdminController extends Controller
{
    protected $walletService;
    protected $paymentService;

    public function __construct()
    {
        $this->paymentService = new PaymentService();
        $this->walletService = new WalletService();
    }
    
    public function dashboard()
    {
        $startDate = Carbon::now()->subDays(14)->startOfDay();

        // Berechnen Sie die Anzahl der Benutzer bis zum Startdatum der letzten 14 Tage
        $totalUsersBeforeStartDate = User::whereNotBetween('id', [10000, 10018])
                                        ->where('created_at', '<', $startDate)
                                        ->count();

        $dailyRegistrations = User::select(DB::raw('DATE(created_at) as date'), DB::raw('count(*) as users'))
                                    ->whereNotBetween('id', [10000, 10018])
                                    ->where('created_at', '>=', $startDate)
                                    ->groupBy('date')
                                    ->orderBy('date', 'ASC')
                                    ->get();
        
        // Berechnung für alle Benutzer
        $cumulativeUsers = [];
        $dailyDifference = [];
        $totalUsers = $totalUsersBeforeStartDate;
        $previousDayUsers = $totalUsersBeforeStartDate;

        foreach ($dailyRegistrations as $registration) {
            $totalUsers += $registration->users;
            $cumulativeUsers[$registration->date] = $totalUsers;
            
            // Berechnung der täglichen Differenz
            $currentDayDifference = $totalUsers - $previousDayUsers;
            $dailyDifference[$registration->date] = $currentDayDifference;
            $previousDayUsers = $totalUsers;
        }

        // Berechnung für Benutzer mit der Rolle "creator"
        $totalCreatorsBeforeStartDate = User::where('role', 'creator')
                                            ->whereNotBetween('id', [10000, 10018])
                                            ->where('created_at', '<', $startDate)
                                            ->count();
    
        $dailyCreatorRegistrations = User::select(DB::raw('DATE(created_at) as date'), DB::raw('count(*) as creators'))
                                            ->where('role', 'creator')
                                            ->whereNotBetween('id', [10000, 10018])
                                            ->where('created_at', '>=', $startDate)
                                            ->groupBy('date')
                                            ->orderBy('date', 'ASC')
                                            ->get();
    
        $cumulativeCreators = [];
        $dailyDifferenceCreators = [];
        $totalCreators = $totalCreatorsBeforeStartDate;
        $previousDayCreators = $totalCreatorsBeforeStartDate;
    
        foreach ($dailyCreatorRegistrations as $registration) {
            $totalCreators += $registration->creators;
            $cumulativeCreators[$registration->date] = $totalCreators;
    
            // Berechnung der täglichen Differenz für creators
            $currentDayDifferenceCreators = $totalCreators - $previousDayCreators;
            $dailyDifferenceCreators[$registration->date] = $currentDayDifferenceCreators;
            $previousDayCreators = $totalCreators;
        }
        
        // Berechnung für Benutzer mit der Rolle "business"
        $totalBusinessesBeforeStartDate = User::where('role', 'business')
                                            ->whereNotBetween('id', [10000, 10018])
                                            ->where('created_at', '<', $startDate)
                                            ->count();
    
        $dailyBusinessRegistrations = User::select(DB::raw('DATE(created_at) as date'), DB::raw('count(*) as businesses'))
                                            ->where('role', 'business')
                                            ->whereNotBetween('id', [10000, 10018])
                                            ->where('created_at', '>=', $startDate)
                                            ->groupBy('date')
                                            ->orderBy('date', 'ASC')
                                            ->get();
    
        $cumulativeBusinesses = [];
        $dailyDifferenceBusinesses = [];
        $totalBusinesses = $totalBusinessesBeforeStartDate;
        $previousDayBusinesses = $totalBusinessesBeforeStartDate;
    
        foreach ($dailyBusinessRegistrations as $registration) {
            $totalBusinesses += $registration->businesses;
            $cumulativeBusinesses[$registration->date] = $totalBusinesses;
    
            // Berechnung der täglichen Differenz für businesses
            $currentDayDifferenceBusinesses = $totalBusinesses - $previousDayBusinesses;
            $dailyDifferenceBusinesses[$registration->date] = $currentDayDifferenceBusinesses;
            $previousDayBusinesses = $totalBusinesses;
        }
                                            
        $usersTotal = User::whereNotBetween('id', [10000, 10018])->count();
        
        $uncheckedCount = User::where('role', 'creator')
                                ->whereHas('data', function($query) {
                                    $query->where('checked', false);
                                })
                                ->has('creatorDetails')
                                ->count();
        $level0Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 0);
                            })
                            ->has('creatorDetails')
                            ->count();
        $level1Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 1);
                            })
                            ->has('creatorDetails')
                            ->count();
        $level2Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 2);
                            })
                            ->has('creatorDetails')
                            ->count();

        return view('admin.dashboard', [
            'usersTotal' => $usersTotal,
            'cumulativeUsers' => $cumulativeUsers,
            'dailyDifference' => $dailyDifference,
            'cumulativeCreators' => $cumulativeCreators,
            'dailyDifferenceCreators' => $dailyDifferenceCreators,
            'cumulativeBusinesses' => $cumulativeBusinesses,
            'dailyDifferenceBusinesses' => $dailyDifferenceBusinesses,
            'uncheckedCount' => $uncheckedCount,
            'level0Count' => $level0Count,
            'level1Count' => $level1Count,
            'level2Count' => $level2Count,
        ]);
    }
    
    public function settings()
    {
        $user = User::find(Auth::id());
        $settings = UserAdmin::where('user_id', Auth::id())->first();

        return view('admin.settings', [
            'user' => $user,
            'settings' => $settings,
        ]);
    }
    
    public function settings_store(Request $request)
    {
        $request->validate([
            'name' => 'required',
            'role' => 'required',
        ]);

        UserAdmin::updateOrCreate(
            ['user_id' => Auth::id()],
            [
                'signature_name' => $request->name,
                'signature_role' => $request->role,
            ]
        );

        return redirect()->back()->with('success', 'Settings saved successful.');
        
    }

    /*
    |--------------------------------------------------------------------------
    | User Management
    |--------------------------------------------------------------------------
    |
    | The following methods are used to manage users in the admin panel.
    |
    */

    public function user_index()
    {
        $hasGrandPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where('permission', 'grand')
            ->where('value', 1)
            ->exists();
        
        $hasAgencyPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'agency')
                      ->orWhere('permission', 'grand');
            })
            ->where('value', 1)
            ->exists();
        
        $hasBusinessPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'business')
                      ->orWhere('permission', 'grand');
            })
            ->where('value', 1)
            ->exists();
        
        $hasCreatorPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'creator')
                      ->orWhere('permission', 'grand');
            })
            ->where('value', 1)
            ->exists();
        
        if (!$hasGrandPermission && !$hasAgencyPermission && !$hasBusinessPermission && !$hasCreatorPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $allUsersQuery = User::query();
        $totalUser = $allUsersQuery->count();
        $activeUser = $allUsersQuery->where('updated_at', '>=', now()->subDays(7))->count();
        $readyCreatorRaw = $allUsersQuery->get();
        $readyCreator = $readyCreatorRaw->filter(function ($user) { return $user->creatorDetails; })->count();
        $totalBusiness = $allUsersQuery->where('role', 'business')->count();
        
        $query = User::orderBy('created_at', 'desc');
        if (!$hasGrandPermission) {
            $roles = [];
            if ($hasCreatorPermission) {
                $roles[] = 'creator';
            }
            if ($hasBusinessPermission) {
                $roles[] = 'business';
            }
            if ($hasAgencyPermission) {
                $roles[] = 'agency';
            }
            if (!empty($roles)) {
                $query->whereIn('role', $roles);
            }
        }
        $users = $query->get();

        return view('admin.user.index', [
            'users' => $users,
            'totalUser' => $totalUser,
            'activeUser' => $activeUser,
            'readyCreator' => $readyCreator,
            'totalBusiness' => $totalBusiness,
        ]);
    }

    public function user_creator()
    {
        $hasGrandPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where('permission', 'grand')
            ->where('value', 1)
            ->exists();
        
        $hasCreatorPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'creator')
                      ->orWhere('permission', 'grand');
            })
            ->where('value', 1)
            ->exists();
        
        if (!$hasGrandPermission && !$hasCreatorPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $allUsersQuery = User::query();
        $totalUser = $allUsersQuery->count();
        $creators = $allUsersQuery->where('role', 'creator')->count();
        $deletedCreator = $allUsersQuery->where('role', 'creator')->where('status', 'deleted')->count();
        
        $users = User::orderBy('created_at', 'desc')->where('role', 'creator')->paginate(100);

        return view('admin.user.creator', [
            'users' => $users,
            'totalUser' => $totalUser,
            'creators' => $creators,
            'deletedCreator' => $deletedCreator,
        ]);
    }

    public function user_business()
    {
        $hasGrandPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where('permission', 'grand')
            ->where('value', 1)
            ->exists();
        
        $hasBusinessPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'business')
                      ->orWhere('permission', 'grand');
            })
            ->where('value', 1)
            ->exists();
        
        if (!$hasGrandPermission && !$hasBusinessPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $allUsersQuery = User::query();
        $totalUser = $allUsersQuery->count();
        $businesses = $allUsersQuery->where('role', 'business')->count();
        $deletedBusiness = $allUsersQuery->where('role', 'business')->where('status', 'deleted')->count();
        
        $users = User::orderBy('created_at', 'desc')->where('role', 'business')->paginate(100);

        return view('admin.user.business', [
            'users' => $users,
            'totalUser' => $totalUser,
            'businesses' => $businesses,
            'deletedBusiness' => $deletedBusiness,
        ]);
    }

    public function user_show($uuid)
    {
        $user = User::where('uuid', $uuid)->first();

        $orderReviews = OrderReview::where('user_id', $user->id)
            ->select('created_at', 'order_id', 'review', 'rating', 'status', 'published_at')
            ->selectRaw('NULL as from_name');
    
        $extReviews = UserReview::where('user_id', $user->id)
            ->select('created_at', 'from_name', 'review', 'rating', 'status', 'published_at')
            ->selectRaw('NULL as order_id');
        
        $reviews = $orderReviews->union($extReviews)->orderBy('created_at', 'desc')->get();

        if ($user->files) {
            $files = $user->files->where('status', 'approved')->where('type', 'video')->filter(function ($file) {
                return $file->order_reviews ? $file->order_reviews->where('order_id', $file->order_id)->where('user_id', $file->user_id)->where('use_video', '!=', 0)->count() > 0 : false;
            });
        }

        if ($user->references) {
            $references = $user->references;
        }

        if ($user->products) {
            $products = $user->products;
        }

        if ($user->orders) {
            $orders = $user->orders;
        }

        return view('admin.user.profile', [
            'user' => $user,
            'reviews' => $reviews,
            'files' => $files,
            'references' => $references,
            'products' => $products,
            'orders' => $orders,
        ]);
    }

    public function user_status_change($uuid, $type)
    {
        $user = User::where('uuid', $uuid)->first();

        if (!$user) {
            return redirect()->back()->withErrors('User not found.');
        }

        if ($type == 'delete') {
            $date = date('Y_m_d');
            $user->email = 'deleted_' . $date . '_' . $user->email;
            $user->status = 'deleted';
        } elseif ($type == 'ban') {
            $user->status = 'banned';
        } elseif ($type == 'activate') {
            $user->status = 'active';
        } else {
            return redirect()->back()->withErrors('Status could not be changed.');
        }

        $user->save();

        return redirect()->back()->with('success', 'User '.$type.' successful.');
    }

    public function user_level_index()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'levels');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $users = User::where('role', 'creator')
                        ->has('creatorDetails')
                        ->orderBy('created_at', 'asc')
                        ->get();
        
        $uncheckedCount = User::where('role', 'creator')
                                ->whereHas('data', function($query) {
                                    $query->where('checked', false);
                                })
                                ->has('creatorDetails')
                                ->count();
        $level0Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 0);
                            })
                            ->has('creatorDetails')
                            ->count();
        $level1Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 1);
                            })
                            ->has('creatorDetails')
                            ->count();
        $level2Count = User::where('role', 'creator')
                            ->whereHas('data', function($query) {
                                $query->where('checked', true)->where('level', 2);
                            })
                            ->has('creatorDetails')
                            ->count();
        
        return view('admin.user.levels', [
            'users' => $users,
            'uncheckedCount' => $uncheckedCount,
            'level0Count' => $level0Count,
            'level1Count' => $level1Count,
            'level2Count' => $level2Count,
        ]);
    }

    public function user_level_change($type, $id)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'levels');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $user = User::find($id);

        if (!$user) {
            return redirect()->back()->withErrors('User not found.');
        }

        if ($type == 'up') {
            $user->data->level++;
            $user->data->checked = true;
            $user->data->last_check_at = now();
            $user->data->save();
            
            $user->applications()->update(['visible' => $user->data->level]);
            
            return redirect()->back()->with('success', 'User Level successful changed.');
        } elseif ($type == 'down' && $user->data->level > 0) {
            $user->data->level--;
            $user->data->checked = true;
            $user->data->last_check_at = now();
            $user->data->save();
            
            $user->applications()->update(['visible' => $user->data->level]);
            
            return redirect()->back()->with('success', 'User Level successful changed.');
        } elseif ($type == 'check') {
            $user->data->checked = true;
            $user->data->last_check_at = now();
            $user->data->save();
            
            return redirect()->back()->with('success', 'User successful marked as checked.');
        } else {
            return redirect()->back()->withErrors('Level could not be changed.');
        }
    }

    public function user_payout()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'payouts');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $payouts = WalletPayouts::orderByRaw("FIELD(status, 'initiated', 'completed') ASC")
            ->orderBy('created_at', 'desc')
            ->paginate(25);

        return view('admin.user.payout', [
            'payouts' => $payouts,
        ]);
    }

    public function user_payout_action($id)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'payouts');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $payout = WalletPayouts::find($id);

        if (!$payout) {
            return redirect()->back()->withErrors('Payout not found.');
        }

        if ($payout->status == 'initiated') {
            $transferResult = $this->paymentService->createPixTransfer($payout->amount, $payout->type, $payout->destination, 'Pagamento de saldo');
            if (is_string($transferResult)) {
                $transferResult = json_decode($transferResult, true);
            }
            if (isset($transferResult['object']) && $transferResult['object'] === 'transfer') {
                $this->walletService->fulfilledPayout($payout);
            } elseif (isset($transferResult['errors'])) {
                $errorDescription = $transferResult['errors'][0]['description'];
                return redirect()->back()->withErrors($errorDescription);
            } elseif (is_string($transferResult) && $transferResult === 'Unauthorized') {
                return redirect()->back()->withErrors('Unauthorized access. Please check your credentials.');
            } else {
                return redirect()->back()->withErrors('Unknown error');
            }
        } else {
            return redirect()->back()->withErrors('Payout could not be fulfilled.');
        }
    }

    public function changeRole(Request $request, User $user, $role)
    {
        // Überprüfen, ob die neue Rolle gültig ist
        if (!in_array($role, ['creator', 'business', 'agency'])) {
            return redirect()->back()->with('error', __('Invalid role.'));
        }

        // Rolle ändern
        $user->role = $role;
        $user->save();

        return redirect()->back()->with('success', __('Successfully changed role.'));
    }

    /*
    |--------------------------------------------------------------------------
    | Lead Management
    |--------------------------------------------------------------------------
    |
    | The following methods are used to manage leads in the admin panel.
    |
    */

    public function lead_index($list = null)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        if ($list) {
            $list = intval($list);
            $leads = Lead::where('lead_list', $list)->orderBy('created_at', 'desc')->paginate(100);
        } else {
            $leads = Lead::orderBy('created_at', 'desc')->paginate(100);
        }

        return view('admin.lead.index', [
            'leads' => $leads,
        ]);
    }

    public function lead_reminder()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }
        
        $reminders = LeadActivity::where('status', 'open')->orderBy('due_date', 'asc')->get();

        return view('admin.lead.reminder', [
            'reminders' => $reminders,
        ]);
    }

    public function lead_show($id)
    {
        $lead = Lead::where('id', $id)->first();

        return view('admin.lead.profile', [
            'lead' => $lead,
        ]);
    }

    public function lead_update(Request $request, $id)
    {
        $lead = Lead::where('id', $id)->first();

        // Aktualisieren des Leads
        $lead->update([
            'cnpj' => $request->input('cnpj'),
            'name' => $request->input('name'),
            'company' => $request->input('company'),
            'branch' => $request->input('branch'),
            'type' => $request->input('type'),
            'status' => $request->input('status'),
        ]);

        // Redirect zurück zur Seite mit einer Erfolgsnachricht
        return redirect()->back()->with('success', 'Lead information updated successfully.');
    }

    public function lead_add()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        return view('admin.lead.add');
    }

    public function lead_upload()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $lists = LeadList::orderBy('name', 'asc')->get();

        return view('admin.lead.upload',[
            'lists' => $lists,
        ]);
    }

    public function lead_upload_store(Request $request)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $request->validate([
            'leadlist' => 'required|file',
        ]);

        // Datei speichern und Pfad erhalten
        $path = $request->file('leadlist')->store('leadlists', 'local');

        // Neuen Eintrag in der Datenbank erstellen
        LeadTempfile::create([
            'user_id' => Auth::id(), 
            'list_id' => $request->list,
            'path' => $path, 
            'category' => $request->listcategory,
            'status' => 'pending'
        ]);

        return redirect()->route('admin.lead.mapping')->with('success', 'Upload successful.');
    }

    public function lead_mapping()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $leadsImport = LeadTempfile::where('user_id', Auth::id())
                                         ->where('status', 'pending')
                                         ->first();
        
        if(!$leadsImport){
            return redirect()->route('admin.lead.upload')->with('error', 'No file for import available.');
        }

        $path = storage_path('app/' . $leadsImport->path);

        $extension = pathinfo($path, PATHINFO_EXTENSION);

        if ($extension === 'csv') {
            $readerType = Csv::class;
            $reader = new $readerType();
            $spreadsheet = $reader->load($path);
        } elseif ($extension === 'xlsx') {
            $readerType = Xlsx::class;
            $reader = new $readerType();
            $spreadsheet = $reader->load($path);
        } else {
            $spreadsheet = IOFactory::load($path);
        }

        $worksheet = $spreadsheet->getActiveSheet();
        $firstRow = $worksheet->getRowIterator(1, 1)->current();
        $values = [];

        foreach ($firstRow->getCellIterator() as $cell) {
            $values[] = $cell->getValue();
        }

        return view('admin.lead.mapping', [
            'leadsImport' => $leadsImport,
            'values' => $values,
        ]);
    }

    public function leads_import(Request $request)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $leadsImport = LeadTempfile::where('user_id', Auth::id())
                                         ->where('status', 'pending')
                                         ->first();
        
        if(!$leadsImport){
            return redirect()->route('admin.lead.upload')->with('error', 'No file for import available.');
        }

        $path = storage_path('app/' . $leadsImport->path);

        $extension = pathinfo($path, PATHINFO_EXTENSION);
        if ($extension === 'csv') {
            $readerType = Csv::class;
            $reader = new $readerType();
            $spreadsheet = $reader->load($path);
        } elseif ($extension === 'xlsx') {
            $readerType = Xlsx::class;
            $reader = new $readerType();
            $spreadsheet = $reader->load($path);
        } else {
            $spreadsheet = IOFactory::load($path);
        }
        $worksheet = $spreadsheet->getActiveSheet();
        $rowIterator = $worksheet->getRowIterator(2); // Startet bei der zweiten Zeile
        $values = [];

        foreach ($rowIterator as $row) {
            $cellIterator = $row->getCellIterator();
            $cellIterator->setIterateOnlyExistingCells(false); // Loop through all cells, even if it is not set
            $rowValues = [];
            foreach ($cellIterator as $cell) {
                $rowValues[] = $cell->getValue();
            }
            $values[] = $rowValues;
        }

        $mapping = $request->except(['_token']);

        foreach ($values as $row) {
            $leadData = [];
            $leadAddressData = [];
            $leadEmailData = [];
            $leadPhoneData = [];
            $leadWebsiteData = [];
            $additionalData = [];

            // Fügen Sie die team_id und projekt_id hinzu
            $leadData['category'] = $leadsImport->category;

            // Definieren Sie die Felder für jedes Array
            $leadDataFields = ['cnpj', 'name', 'company', 'branch', 'source', 'type', 'status'];
            $leadAddressDataFields = ['address', 'street', 'number', 'additional', 'city', 'state', 'zip', 'country'];
            $leadEmailDataFields = ['email'];
            $leadPhoneDataFields = ['phone'];
            $leadWebsiteDataFields = ['url'];


            foreach ($mapping as $column => $mappedColumn) {
                if ($mappedColumn !== null) {
                    // Finden Sie den Index der Spalte in der $values-Array
                    $columnIndex = array_search($column, array_keys($mapping));
        
                    // Überprüfen Sie, ob der Index existiert, bevor Sie darauf zugreifen
                    if (isset($row[$columnIndex])) {
                        // Bereinige die cnpj-Daten, falls vorhanden und zugeordnet
                        if ($mappedColumn === 'cnpj') {
                            $row[$columnIndex] = preg_replace('/[^A-Za-z0-9]/', '', $row[$columnIndex]);
                        }

                        // Überprüfen Sie, zu welchem Array das Feld gehört und fügen Sie es ein
                        if (in_array($mappedColumn, $leadDataFields)) {
                            $leadData[$mappedColumn] = $row[$columnIndex];
                        } elseif (in_array($mappedColumn, $leadAddressDataFields)) {
                            $leadAddressData[$mappedColumn] = $row[$columnIndex];
                        } elseif (in_array($mappedColumn, $leadEmailDataFields)) {
                            $leadEmailData[$mappedColumn] = $row[$columnIndex];
                        } elseif (in_array($mappedColumn, $leadPhoneDataFields)) {
                            $leadPhoneData[$mappedColumn] = $row[$columnIndex];
                        } elseif (in_array($mappedColumn, $leadWebsiteDataFields)) {
                            $leadWebsiteData[$mappedColumn] = $row[$columnIndex];
                        }
                    }
                } else {
                    // Wenn kein Mapping vorhanden ist, fügen Sie die Daten in die $additionalData-Array ein
                    $index = array_search($column, array_keys($mapping));
                    if (isset($row[$index])) {
                        $additionalData[$column] = $row[$index];
                    }
                }
            }

            // Fügen Sie die zusätzlichen Daten als JSON hinzu
            $leadData['other'] = json_encode($additionalData);
            $leadData['lead_list'] = $leadsImport->list_id;

            // Erstellen Sie das neue Lead-Objekt
            $lead = Lead::create($leadData);

            // Überprüfen Sie, ob mindestens eines der angegebenen Felder einen Wert hat
            if (!empty(array_filter(array_intersect_key($leadAddressData, array_flip($leadAddressDataFields))))) {
                $leadAddressData['lead_id'] = $lead->id;
                $leadAddressData['label'] = 'Main';
                LeadAddress::create($leadAddressData);
            }
            if (!empty(array_filter(array_intersect_key($leadEmailData, array_flip($leadEmailDataFields))))){
                $leadEmailData['lead_id'] = $lead->id;
                $leadEmailData['label'] = 'Main';
                $leadEmailData['primary'] = true;
                LeadEmail::create($leadEmailData);
            }
            if (!empty(array_filter(array_intersect_key($leadPhoneData, array_flip($leadPhoneDataFields))))){
                $leadPhoneData['lead_id'] = $lead->id;
                $leadPhoneData['label'] = 'Main';
                $leadPhoneData['primary'] = true;
                LeadPhone::create($leadPhoneData);
            }
            if (!empty(array_filter(array_intersect_key($leadWebsiteData, array_flip($leadWebsiteDataFields))))){
                $leadWebsiteData['lead_id'] = $lead->id;
                $leadWebsiteData['label'] = 'Homepage';
                LeadWebsite::create($leadWebsiteData);
            }
        }

        Storage::disk('local')->delete($leadsImport->path);

        $leadsImport->delete();

        return redirect()->route('admin.lead.upload')->with('success', 'Leads successfully imported.');
    }

    public function lead_lists()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $lists = LeadList::orderBy('name', 'asc')->paginate(100);

        return view('admin.lead.lists', [
            'lists' => $lists,
        ]);
    }

    public function lead_lists_store(Request $request)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'leads');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $request->validate([
            'listname' => 'required',
            'listdesc' => 'required',
        ]);

        // Neuen Eintrag in der Datenbank erstellen
        LeadList::create([
            'name' => $request->listname,
            'description' => $request->listdesc,
        ]);
        return redirect()->route('admin.lead.lists')->with('success', 'Added successful.');
    }

    /*
    |--------------------------------------------------------------------------
    | Bad Word Management
    |--------------------------------------------------------------------------
    |
    | The following methods are used to manage bad words in the admin panel.
    |
    */

    public function badword_index()
    {
        $words = DataBadWords::orderBy('word', 'asc')->paginate(100);

        return view('admin.badword.index', [
            'words' => $words,
        ]);
    }

    public function badword_store(Request $request)
    {
        $request->validate([
            'word' => 'required',
        ]);

        DataBadWords::create([
            'word' => $request->word,
        ]);

        return redirect()->back()->with('success', 'Bad word added successful.');
    }

    public function badword_delete($id)
    {
        $word = DataBadWords::find($id);

        if (!$word) {
            return redirect()->back()->withErrors('Word to delete not found.');
        }

        $word->delete();

        return redirect()->back()->with('success', 'Word "' . $word->word . '" deleted successful.');
    }

    /*
    |--------------------------------------------------------------------------
    | Admin Management
    |--------------------------------------------------------------------------
    |
    | The following methods are used to manage admins in the admin panel.
    |
    */

    public function role_index()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where('permission', 'grand')
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $admins = User::orderBy('created_at', 'desc')->where('role', 'admin')->get();

        return view('admin.role.index', [
            'admins' => $admins,
        ]);
    }

    public function product_index()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'products');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $products = Product::orderBy('created_at', 'desc')->paginate(50);

        return view('admin.product.index', ['products' => $products]);
    }

    public function order_index()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'orders');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $orders = Order::orderBy('created_at', 'desc')->paginate(50);

        return view('admin.order.index', ['orders' => $orders]);
    }

    public function order_show($uuid)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'orders');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $order = Order::where('uuid', $uuid)->first();

        return view('admin.order.show', [
            'order' => $order,
        ]);
    }

    public function order_visible($uuid)
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'orders');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->back()->withErrors('Order not found.');
        }

        $order->visible = !$order->visible;
        $order->save();

        return redirect()->back()->with('success', 'Order visibility changed.');
    }

    public function chat_index()
    {
        $hasPermission = UserAdminPermission::where('user_id', Auth::id())
            ->where(function($query) {
                $query->where('permission', 'grand')
                    ->orWhere('permission', 'chats');
            })
            ->where('value', 1)
            ->exists();
        if (!$hasPermission) {
            return redirect()->back()->withErrors('You do not have permission to access this page.');
        }

        $messages = OrderChat::orderBy('created_at', 'desc')->paginate(100);

        return view('admin.chat.index', [
            'messages' => $messages
        ]);
    }




    public function sendmail($type, $id)
    {
        if ($type === 'list') {
            $list = LeadList::find($id);
            $lead = '';
            $user = '';
        } elseif ($type === 'lead') {
            $list = '';
            $lead = Lead::find($id);
            $user = '';
        } elseif ($type === 'user') {
            $list = '';
            $lead = '';
            if ($id == 'all' || $id == 'creator' || $id == 'business') {
                $user = $id;
            } else {
                $user = User::find($id);
                if(!$user) {
                    return redirect()->back()->withErrors('User not found.');
                }
            }
        } else {
            return redirect()->back()->withErrors('Type not found.');
        }

        return view('admin.sendmail', [
            'type' => $type,
            'id' => $id,
            'list' => $list,
            'lead' => $lead,
            'user' => $user,
        ]);
    }

    public function sendmail_store(Request $request, $type, $id)
    {
        $request->validate([
            'subject' => 'required',
            'message' => 'required',
        ]);

        $userAdmin = UserAdmin::where('user_id', Auth::id())->first();
        if (!$userAdmin) {
            return redirect()->back()->withErrors('You need to add the signature. Please click in the sidebar on the settings.');
        }

        /*$signature = '<p style="margin-left:0px;">
            <span style="color:rgb(5,111,103);"><strong>' . $userAdmin->signature_name . '</strong></span><br>
            <span style="color:rgb(179,179,179);"><i>' . $userAdmin->signature_role . '</i></span><br>
            <br>
            <img src="https://creatify.com.br/img/logo_full.png" alt="Creatify" style="width:150px;"><br>
            <br>
            <span style="color:rgb(5,111,103);"><strong>WhatsApp:</strong></span> <a href="https://wa.me/5585991218107" style="color:rgb(5,111,103);text-decoration:none;">+55 85 99121-8107</a><br>
            <br>
            <a href="https://creatify.com.br/utm_source=email&utm_campaign=' . $userAdmin->signature_name . '"><span style="color:rgb(5,111,103);text-decoration:none;">www.creatify.com.br</span></a><br>
            <a href="mailto:oi@creatify.com.br" style="color:rgb(5,111,103);"><span style="color:rgb(5,111,103);text-decoration:none;">oi@creatify.com.br</span></a>
        </p>';*/

        $signature = '<div> -- <br>
            <br>
            <div>
                <img alt="" src="https://image.crisp.chat/avatar/website/d691f9d0-0b8e-47d1-820c-46026ea52c10/200/" style="background-size:contain;background-repeat:no-repeat;background-position:center;background-color:#ebebeb;width:2em;height:2em;max-width:30px;max-height:30px;margin-right:.5em;vertical-align:middle;display:inline-block;border-radius:2em">
                <strong style="color:#000000">' . $userAdmin->signature_name . '</strong> from <a href="https://creatify.com.br/" target="_blank">Creatify</a>.
            </div>
            </div>';

        if ($type === 'list') {
            $id = intval($id);
            $leads = Lead::where('lead_list', $id)->orderBy('created_at', 'desc')->get();
            foreach ($leads as $lead) {
                if ($lead->emails && count($lead->emails) > 0) {
                    $firstName = explode(' ', $lead->name)[0];
                    $subject = str_replace(['{{name}}', '{{company}}', '{{email}}'], [$lead->name, $lead->company, $lead->emails->first()->email], $request->subject);
                    $html_body = str_replace(['{{name}}', '{{company}}', '{{email}}'], [$firstName, $lead->company, $lead->emails->first()->email], $request->message);

                    // Fügen Sie die Signatur hinzu
                    $html_body .= $signature;

                    LeadSendmail::create([
                        'lead_id' => $lead->id,
                        'email' => $lead->emails->first()->email,
                        'status' => 'pending',
                        'subject' => $subject,
                        'html_body' => $html_body,
                        'sent_by' => Auth::id(),
                    ]);
                }
            }
        } elseif ($type === 'lead') {
            $id = intval($id);
            $lead = Lead::find($id);
                if ($lead->emails && count($lead->emails) > 0) {
                    $firstName = explode(' ', $lead->name)[0];
                    $subject = str_replace(['{{name}}', '{{company}}', '{{email}}'], [$firstName, $lead->company, $lead->emails->first()->email], $request->subject);
                    $html_body = str_replace(['{{name}}', '{{company}}', '{{email}}'], [$firstName, $lead->company, $lead->emails->first()->email], $request->message);

                    // Fügen Sie die Signatur hinzu
                    $html_body .= $signature;

                    LeadSendmail::create([
                    'lead_id' => $lead->id,
                    'email' => $lead->emails->first()->email,
                    'status' => 'pending',
                    'subject' => $subject,
                    'html_body' => $html_body,
                    'sent_by' => Auth::id(),
                ]);
            }
        } elseif ($type === 'user') {
            if($id == 'all' || $id == 'creator' || $id == 'business') {
                if($id == 'all') {
                    $users = User::get();
                } elseif($id == 'creator' || $id == 'business') {
                    $users = User::where('role', $id)->get();
                }

                foreach ($users as $user) {
                    if ($user->email) {
                        $firstName = explode(' ', $user->firstname)[0];
                        $subject = str_replace(['{{name}}', '{{email}}'], [$firstName, $user->email], $request->subject);
                        $html_body = str_replace(['{{name}}', '{{email}}'], [$firstName, $user->email], $request->message);

                        // Fügen Sie die Signatur hinzu
                        $html_body .= $signature;

                        UserSendmail::create([
                            'user_id' => $user->id,
                            'email' => $user->email,
                            'status' => 'pending',
                            'subject' => $subject,
                            'html_body' => $html_body,
                            'sent_by' => Auth::id(),
                        ]);
                    }
                }
            } else {
                $id = intval($id);
                $user = User::find($id);
                if ($user->email) {
                    $firstName = explode(' ', $user->firstname)[0];
                    $subject = str_replace(['{{name}}', '{{email}}'], [$firstName, $user->email], $request->subject);
                    $html_body = str_replace(['{{name}}', '{{email}}'], [$firstName, $user->email], $request->message);

                    // Fügen Sie die Signatur hinzu
                    $html_body .= $signature;

                    UserSendmail::create([
                        'user_id' => $user->id,
                        'email' => $user->email,
                        'status' => 'pending',
                        'subject' => $subject,
                        'html_body' => $html_body,
                        'sent_by' => Auth::id(),
                    ]);
                }
            }
        } else {
            return redirect()->back()->withErrors('Type not found.');
        }

        return redirect()->back()->with('success', 'Emails successfully sent.');
    }

    public function email_index()
    {
        $emails = EmailStatus::orderBy('created_at', 'desc')->paginate(100);

        return view('admin.email.index', [
            'emails' => $emails,
        ]);
    }

    public function faq_index()
    {
        $faqs = Faq::with('authorRelation')->orderBy('created_at', 'desc')->paginate(25);
        return view('admin.faq.index', ['faqs' => $faqs]);
    }

    public function faq_create()
    {
        $users = User::whereIn('role', ['admin', 'author'])->get();

        return view('admin.faq.create', ['users' => $users]);
    }

    public function faq_store(Request $request)
    {
        $request->validate([
            'for' => 'required',
            'question' => 'required',
            'answer' => 'required',
            'author_id' => 'required|exists:users,id',
        ]);

        $faq = new Faq;
        $faq->for = $request->input('for');
        $faq->question = $request->input('question');
        $faq->answer = $request->input('answer');
        $faq->author_id = $request->input('author_id');
        $faq->save();

        return redirect()->back()->with('success', 'Post successfully saved.');
    }

    public function faq_edit($id)
    {
        $faq = Faq::find($id);
        $users = User::whereIn('role', ['admin', 'author'])->get();

        return view('admin.faq.edit', ['faq' => $faq, 'users' => $users]);
    }

    public function faq_update(Request $request, $id)
    {
        $request->validate([
            'for' => 'required',
            'question' => 'required',
            'answer' => 'required',
            'author_id' => 'required|exists:users,id',
        ]);

        $faq = Faq::find($id);
        $faq->for = $request->input('for');
        $faq->question = $request->input('question');
        $faq->answer = $request->input('answer');
        $faq->author_id = $request->input('author_id');
        $faq->save();

        return redirect()->back()->with('success', 'Post successfully updated.');
    }

    public function faq_delete($id)
    {
        $faq = Faq::find($id);

        if (!$faq) {
            return redirect()->back()->withErrors('Post to delete not found.');
        }

        $faq->delete();
        
        return redirect()->back()->with('success', 'Post successfully deleted.');
    }



















    
    public function contact_list()
    {
        $contacts = Contact::orderBy('created_at', 'desc')->paginate(25);

        return view('admin.contacts.list', [
            'contacts' => $contacts
        ]);
    }

    public function blog_list()
    {
        // Hier holen wir alle Blogposts aus der Datenbank.
        $posts = BlogPost::with('authorRelation')->orderBy('created_at', 'desc')->paginate(25);

        // Dann übergeben wir die Blogposts an die View.
        return view('admin.blog.list', ['posts' => $posts]);
    }

    public function blog_create()
    {
        // Annahme: 'role' ist ein Attribut in Ihrer 'users' Tabelle.
        $users = User::whereIn('role', ['admin', 'author'])->get();

        // Übergeben der Benutzerdaten an die View.
        return view('admin.blog.create', ['users' => $users]);
    }

    public function blog_create_store(Request $request)
    {
        $request->validate([
            'title' => 'required|unique:blog_posts,title',
            'url' => 'required|unique:blog_posts,url',
            'image' => 'required|image|max:2048', // Erlaubt das Hochladen von Bildern bis zu einer Größe von max. 1MB.
            'author' => 'required|exists:users,id', // Stellt sicher, dass der Autor existiert.
            'description' => 'required',
            'headline' => 'required',
        ]);

        if($request->hasFile('image')) {
            $headerimage = $request->file('image'); // Assuming 'image' is the name of the input field
            $filenameWithExt = $headerimage->getClientOriginalName();
            $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);
            $extension = $headerimage->getClientOriginalExtension();
            $fileNameToStore = $filename.'_'.time().'.'.$extension;

            $filePath = 'blogimages/' . $fileNameToStore;
            Storage::disk('s3')->put($filePath, file_get_contents($headerimage));
            $path = Storage::disk('s3')->url($filePath);
        } else {
            $fileNameToStore = 'noimage.jpg';
            $path = '/img/noimage.jpg';
            $filePath = '/img/noimage.jpg';
        }    

        // Erstellen eines neuen Blog-Posts und Speichern in der Datenbank
        $post = new BlogPost;
        $post->title = $request->input('title');
        $post->url = $request->input('url');
        $post->image = $path;
        $post->image_path = $filePath;
        $post->author = $request->input('author');
        $post->description = $request->input('description');
        $post->headline = $request->input('headline');
        $post->seo_title = $request->input('seo_title');
        $post->seo_description = $request->input('seo_description');
        $post->save();

        // Weiterleiten zur Blogpost-Liste mit einer Erfolgsmeldung.
        return redirect()->route('admin-blog')->with('success', 'Blog post successfully saved.');
    }

    public function blog_edit($id)
    {
        $post = BlogPost::find($id);
        $users = User::whereIn('role', ['admin', 'author'])->get();

        return view('admin.blog.edit', ['post' => $post, 'users' => $users]);
    }

    public function blog_edit_store(Request $request, $id)
    {
        $request->validate([
            'title' => 'required',
            'url' => 'required',
            'image' => 'image|max:1024|nullable',
            'author' => 'required|exists:users,id',
            'description' => 'required',
            'headline' => 'required',
        ]);
    
        $post = BlogPost::find($id);
    
        if($request->hasFile('image')) {
            if($post->image_path) {
                Storage::disk('s3')->delete($post->image_path);
            }
    
            $headerimage = $request->file('image');
            $filenameWithExt = $headerimage->getClientOriginalName();
            $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);
            $extension = $headerimage->getClientOriginalExtension();
            $fileNameToStore = $filename.'_'.time().'.'.$extension;
    
            $filePath = 'blogimages/' . $fileNameToStore;
            Storage::disk('s3')->put($filePath, file_get_contents($headerimage));
            $path = Storage::disk('s3')->url($filePath);
    
            $post->image = $path;
            $post->image_path = $filePath;
        }
    
        $post->title = $request->input('title');
        $post->url = $request->input('url');
        $post->author = $request->input('author');
        $post->description = $request->input('description');
        $post->headline = $request->input('headline');
        $post->seo_title = $request->input('seo_title');
        $post->seo_description = $request->input('seo_description');
        $post->save();
    
        return redirect()->route('admin-blog')->with('success', 'Blog post successfully updated.');
    }

    public function blog_delete($id)
    {
        $post = BlogPost::find($id);

        if (!$post) {
            return redirect()->route('admin-blog')->withErrors('Post to delete not found.');
        }

        $imagePath = $post->image_path;

        if ($imagePath) {
            Storage::disk('s3')->delete($imagePath);
        }

        $post->delete();
        
        return redirect()->route('admin-blog')->with('success', 'Post erfolgreich gelöscht.');
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�S��A���9w��xļx�2���T�s��F�<:
��<��;kv<�C��<(Ke<`�<[���~^<J?�<#�<�8=:�=M�˻�!(<�Ⱥ<��$��:g<W�g���鼤�<b"�}�D=��L��ͻ�*�<+R�x��<9��<|�=K�+=���<4��<J�E:�P8=>a�$4��X
=���˷�4=@z9����<s����9����<2;N��/������T��t;i: =�	��_=cW6���3���d@�Qx���"=���;�T�<e1=��;������]�?_�M�H=޾�<���"����H����<gj�kj��Qe�;5[)��
{<����
�������J�X�
ż�<�2=q�;R��:��<R�;φ�<=c�=i~+�{d�;����C=��q��*@��X�;�֘<av��u(��g=%�wW���;h������=$�����<r���O���1<5�*=�;��|:�:t��?G¼(Zἕ���<�/7=)���2=�~T��m4��=W �<+ɘ9qx���it�
�B=��<<k���'�A<ſD��Ρ<�|l:����h�»����X�ؼ�c���D���2�9���+j=�=t9�YL��p�<�[߼JN<iǗ���J�m��}4���k�_kp�����{9�.��T]����o���.Ի�����q5<�/=�R<ٚ�<�{<P�Y�|#i<�(�����<�F����y<��v��<��=&�;���<$�=�'��K���M=��(�뾬���=
�3<E�0=P�$=W�q<�����p�<��P�oJ�<�E����:�]=]κ�o�����s�����<(񀽤!o�G[3�u*A�3@*��L�<sZ�<�zƼ�=j��<u�=Y9ջ�'-�-F�UfB���;���ۼ>K��~'=<X��A#�	ϛ<���<����o��)Qy<[R�4Tռ!J<b
�;��ٻ�1���6<RSF=��=��߻�=�,`������¼f��<��V==�M<f��;Oh;��Hϼ��׺ML'���<�S�;�j�<�oC���?
���L=g9=�m=����6�;3=�Ց<O�Һ�t��\�<����}��R<
�<�I,=깧�s�<��:Ef�<�<�<��:Yf<�ټ��8=@*2;����B�
����<!tU=����Ϲa<J����໻�Y95��9i�<߃Q���:�-_����J̚;u,P<L�X�NT������=g����=���M/�<^4����T<�p;���5؈�
�)<�B�;�]<E�<�N<	���Tż�=��.=������r<-�&=���R܊<��ݼ޷V��ŻlQ����:��<A��<`⺓-�;�?�[2�<�<�J�<�NB������i�p�#��������<�[��Z����@;�i��y�V<'� =;N3��QL����<]Uúaù�ӈ��%C<�8b�\�)���"�����]Z�<�ӹ� k<�G���0�-:!�P�:��=l=H��
=?�;�@��o�;�Ũ:5E�<۫:���=��<m.�=��D=���v����{��>U[<��<k�<���:�C��4�J�a�9؆<Q�O����� =�W����<9q�;MB�Қ��~�j=e<��c�Q�^�Dcӻ`� �`nJ��1�r��;H�=�;r�d�4=`�
��;.��Fa���X<��;M��e�D�I�<�y;U��<�� �;S�;�I�u�!=6>=��=Q,
�r^ɼ�닺���;�����s<
�<d�;�k�߯q�Pr����	<J~�<*�<�.c�k<��<�G�;TQ=.�<5�����j�j<�_�<a�༖>�=@n=\!��|�<�"7���>��,鼠�_�
�������M�<`�K�:�DJ�;zd,9���=���<�һ:�Ѽϖ���3���;=�Vc=����ߢq��T�;'1�cY�ț�=�U,����<�B��'6���<��=)����و<���;5 <��4< NX�[�;�O��7�ɼP�v;�=��Q; ��<<�B�N�<p�v�� ���<�h��|��<�>Y;��μ�m|�y%����� �<䄑��>�:JMn;Ķ+�=BJ;u�<L�E�O<��0-��<~<��'=��<�|< ��<^';���<��<m¼�c�;uFE=7m���<?���g�x���;M�����B<z�G�<�s���OV=8
,=,ii�x_�<�03<��:)H��hŻ��P<��Y�d�#5�;Pu;��;�]�<?_��(�<��U������@�R� �ZH���h�-:���Y%<�Fϼ��<6	5;z��;g�0I=��<z�7=�����=�m�Q<���xfȺ>���U���%���Y;����<�<����Y�<K��*af<�囼ƚ޼���0M=S=�P���f��`�<+��X�e<PXU��*�<���<F�:U�c<Tqͼ9m��x�m�<��gJ����z=xZ����;�@�����<����:��;���;���<<v$���'=�;	�)ֶ<!��;�!"<4�
<�b���ӻڛ�1'��c;;�G@�N�=��;V����s�<ښ
����lۼ웬<�V
<n�*<��&<w6X<�X��܃;d��:~F�<K��}�<�0�=�?O��c5�U9�<"
>���=�lI��0�<����i����@�����!ɼ�Z�����<k��;fA<�<ޕݻ)���7Xj�r�/�~B�a�<��&�J_�<>�ü[eƽ��x�Iѯ���O<�X@��y���<�L�;�=�/a�
üRg��� =-�����==�7�;�<m��`����=@��_o�,?g;3�4�_A��f�<���<J�L��t=�<�@c��:���g<y.<��;hgt�,.�<]Sۼe�;a0N;
<e�,��;f��%������&ּ"D�IY8=Ѵ`='�����y�Ԛ���B<#�;X?��'�z<�۵����<�]=�.���U<s��5~=-=������~0��W��j|��
�;/և<�~z�'x��LJ��S�;���:��=�	o�Sn��ܰ��2�"-�ȌF<��G9i��5�B�#"��GA�h�=0Wj<!�ݼ�yԼ.�ʼ�L�^�.<���;����f����q��S<��z<'�>�?�Q��0)=�T��o�<��=1�����?�<�n	��牻���Z�<��E:�m�<Zؘ���=f�<�Գ������0�q�C;ѐ���$���	��!���ǡ<�L����<��b<�&��Bo�	Ga�u+h�_��<�'�_4�<�gp<��<�x˺c����=����=�!\�V��v���<�=����מ<�=<O�m���]�l14��k�<�.[-;��n<4��<�K��3�M�<A�Ҽ�?�Z�<�4>�$�g<08�<��<v��;5�V<@����86�^<��;
9�<Z����W<�L:��/Y;+q�A�<JlS::ۈ;4�U:i�]�@�r=z��<��<�漡9<Ԧ�;۲ӻS���B��<kё<p�\����9͈�tG;-����E<��=`;(����ހ6<���;���;L����a�<*O��P�;jn麰�l=��켥b!<����.=���y`=�=����;A���Mb<�5<����м.yF=skͼe�"��~"<j�	=*]=�s����=�R=���;�V���Kػ���<�&�<� �;��<D��<��z����|#<����x��ޫ��
˼�5=l]-��Bs��Z�d,���n�0�<H�q<�i<B�8ǉ�e��r�;�0��'����Z��9�;��=���<=fd^=
3�<(}y���m����;b�黕ѭ<�0��B/�;h=n�Y<׀B;jc����<2,ü��<E��<�N �JTh<�ꁼ�<;r�=���< 5Ҽn��Vf.<H�K<�<��=�3�<ۢ�;���:=<$���xX�<k�����_<c�E��8�<Od�f3�:�R��0����������;;��<CZ��Q�.=�;��(Ӝ<!��������<���<T�\��<v6H9��~�|�)=�.����:=�9���<X˽����;�-,=�I��c_�;���<}k�;m�_;�*=Y#<�Wk�ۿ�<Ȟ
�u��G��9�<K<�jӺMMB=gW�<�ĻK;==QF�<.�<����4^�R*(<����vN�<��<#�<�/�<���<�<���ͪ���;|�L��ܻf]�<�R;�%������v4��U;�����C�<�ٜ�V�z<����|�;.��<A��;hpC=}e0<b���"�<B!.<�l��i<#�<ܨ�����<���;���<�
�<�b�;�$���\<�cp;�+=Q����)�;�{�;{_�<�}<����!=`h5;20�:G���p������E���63��E0�r�¼�u�;"<;M3��û�,�<�5"=���:�">��'�$/���<c����<Gp˼���=!�=�^�!w�:/$=��r;G��;ʤ�;m���_�%<Y��=[�������<"!=oĞ�6��ԝ�<�S��J�<����<M���RQ�;kֵ<��Ỗf�;��/��w�;�!�~��:�Ԧ���(�e�x����<��L��O��к�]"=��<�n�<�?<(vS=)��<��C���;<
�;�����<��2�����<Nj+<��<�-H�O�<��U�94����=�/�^���ׯ=��F�}���e6O<�Rz��8��^�<�1d��n<cQ��ո;U�T;�1><���<��A9�+���'���z�ؽl���O�6R�<��[<��>;�)~</I<:V���8��oa<q��|��7�=�A�m�,q;�y���G��7X=���������P:��_�<���<��<�:�;�V=E�G��x�<0��<=c���E=��(���/<��l<�Za<Ѭ<.cɼ�y�;�B�ߕ7�2!�<�z���lE<�O���)2��3X���j���$�.���WKW��k�����;�24<�ǅ<g
�g��W4=��XH<�+����(<,/˼���9�O��s����V��&�:Q�)<��<*%��gC���Լ\f:�]<<FV�<$��8�k����g>𻀈�������B8=n�;��R=7P<]y_:�}ổ�==�������:;[�裢���T�'�U�n���qM�����"5�:E��;ܖ�;�;:z@M� ˪�$"���:�<M<4�;�5��-<H���>�μ��I<�j���6�)�91�P�?B�<~��<iz;��;7G<d�'����#�<bǤ�lm=��-;a��������K:~d<9*@<��<i	޼�:�S����=�X��;�zC<~���4�P=�g)�@y�<��:
u�<��-=�W=�<��< B��
����qu�_)0<t���N<�M�<f<����r�;�Y�<fa7;��1=o�K;�L�W��#�Q�!��<F��o<d5��-�/<�D;ڤ�;_���Ի�瘼9
O�B=L医C7k���;F��H��<��<�*g�O_��#�ɼP~��ˮ���<Om|�)��Ӌ���<HM#�P�����N��9	m�;�2�{Ӽ���;��xX�<&�<`<wϻ�x�<�<�@�gL���6��˻���@�s�^��<J�:;�����Z:�Ff����<�<��;�/���<RJ+=�f;{Y�F���"�:�_�\r�:c��ݐ�<�燼x�̻�F<�n*<L���?8y�o�*�2X�:����n���#���<=8;�;�y-��w���<{�1<2%�<�᭼�Ë;~Ɔ<��f�T����F�㎞���<:�#��RQ<��?��a=}�g��E�:就����<WY�<jk�<�������B�=�H�;x���<��3=��<��d<�V��l�@���&/�;Ie��=��;*H<�%=h��<���ǻ�rG<���O
f<��=˖?<]),<��<ג�<�S�[<���;sچ<��G:u��<Y�����<�O$=��r�1�[;�v;<�nh��G�<(\�<�% <�w2��r<���Q^��@\~<�S��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045689
data:
5source'2%
#app/Http/Controllers/Controller.php(d
8	file_path'2%
#app/Http/Controllers/Controller.php(e
#	file_name2
Controller.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, ValidatesRequests;
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�@��><�
���.ﺵm����W��"���ǰ<�!��Z;�"�z'ڼl,h�퍚<�3�������<�_=?SZ=��W=�8=q���夼2$�;��~��f�<:ʂ;�߼[I�<_Շ<�_}<^1��6f��]�<|Y�<4~Ƽ�wz8&��:��o<�b.�o*��dּK��;w=������������
V����u�<�z<��m��4ܼ|:I���<З6��?�X�=�U�<�=��~�?S�;�Q��|���	��:��� ���9=_ =�"̻@�<r�e�oĕ<Z}g<�V@�$��=���=M�:��2<d}��*u	=)���<�9���_}��T��Ҫ%<{n��W)�AJ=34=U�5��O�<5��<ل��s���x��"��=
YǼ2$�;���b.<m��<�q#�)�J�Q!.�Ȫ�<�%�Ly����<	����!�4�޻d��=!��ɻ�G��Z�<�:����<�x���l:�*���Ϥ�b#+<3���ȼ0��<�e
��m�<M4�f�<�Q�<cjC��8�=@�'O��fR<*~{<�&�;10�<�Qg��TM�7��;3�<<�<��N=܋�j��<��W�V���T��n��<=��<�	=�K�	e+��T=��Ļ6���T(9�@fI��CQ�AJ��	�<�$��PS<s���<�h�;�P��H�!<󺃼���Tᠻ���<�8V:�^i=�u<'�ü�B=:퍚�l���#��
���5�:퍚���6��b=4~F���L=���<���<B�P�$H ;�����������<y�%=�'����c��<P-�oq�<��<��<�Բ:��H�s=�����|(����<���<�/μ|:�<e�_Շ�I�=�Q@�<�N���<������m=Y<.p��\h= �=<$�<I���Y|�#T�<ل<��;{F-��D���Q�&�Իy�R=��������;�>�;�
�<�����䆺�5�=�Ϥ=����k�7=}��<����F7��wz<Y�6���<G@6<�e�jc<�5�<U�i�D�<ZU����~;M�;1X�<��==�Ϥ<n��<10�<�A)<��L������=į3;�k,���ּg]=Z}�By�<��k=��<uD=<�:�dV=D�<�P�����<_����*���[=�=�
5;���;�
�=�Ά<�k��
/<�K�<A�y����<�i�g�<D�'=��><:�ܼ�߼�%�;���:#��<|�a����Q<�8!<82U=DX��=�����ݼ�C��3�<l�
�%[<\h�<?�r;+JR�
�f9�.����˼J)��P�;Q�B�|:I���=#ⴻ���;ɕ�<8����@�#�4�[�<k�7<��s�;�Ѓ�S\�<5��1���e��A�<c�s�?B<�l<����~���y�<��<�]�;,)<=э<�"̺�G=���$��dֻ�hP<�uR��>���;u`�:�
5<���2$?�u`ܼ	e�;��ü����-|<h�=rx$���<�4���<���;lk<��&<} ���ϻq=�آ;($t=����=�
=�����=��<*u�9Ci<pׄ<V�<�:��vf��a�5�5��C�;��n=6��"޼��:��;�T=K��+"
;Yj��h1��D�?�d}��p���<$����$��i�;���;��<hxY�[&�	F�<�|<
�<��ջ����;~M8=+:<6f~��F7�vK��>x<����G=%<�<%�<�{���	��
8
�<$
���=�3�j�H;���p�^���(���;Ւ�;o.=����x?"=���p���.�37.=(�[=�l�<��";ݞ���*=Ւ]���W=-]A=�w�<�r����oRF�*~{<�(�ɕ��s��З6���
=�"���C�c�<�8�=��w��e<�b.��_�<b#����T<{e�u����5���v��s��d}��b#+��8�
A<�S<�r7��[#=�!�8B�O�S<�$�E�<
���'�M&�֥̼?����6�M=��*��=�<�M�� ��:f����=���X�/�3�mj�J�<�1;
V<Ɨk<rx$<(�����<��:q��<s��<�H_<�<�C�Z}�I
<��;�id=;X��x?"��i/��Z����X#�c�<�*� E����<Dع� ٺ)�<�><�PS�y�R��]ռ��=�:<���<�%��e�J���6�_�L�.p0=]\�����2C�;���=�A�e�X����M��䠾�������A�������u���:��A^<z����ּhxY=�b�<�:<���9ڗ��IS��E9�����<�3�:���<�H߼`��<V�<�
j<Q@��z�A���Z��P��uR�:��h1A<�<�)�<��:]��;B2�<�[�;�N�x��N�<X#�a��2C�<+J�;u`\=�м�ܻ��U<���3�o<��<oRF�#]�������<��<��=#���펼{��l�O����<�>C��<"�ż��F<_�;�.�s��A�a�f�=�
�����:�	����
�f���������)��;��U=�ü�˼(b=p�=z'Z�A�a<��R�6f��0-����<T(�<�x�#�4;���c���<�{?��<<�p=��= ��X��tMm����=6� <�,=X�Ǻ&�Լ;�K�8�<�{�;�����l=�TM<5���V@<����[�	e+����;ToQ<��<u�=S4���'%��{���K�<q���˻�=��x<퍚<�V����f�\����<���K<���;�.=d�ċ9�z�<����bO;��(���߼�J����<H_�<
�f;0�7����<s�<<Yﶻ-|=��<���o<�s�������3=��<W�+�G��<x�
���2���㻐��<TG�:A��<�����p��*u<�O?;f��<1�<�K�����e����<�vf���[<�������׼����{e���üU�<J�ջ���<�O=���<�
5�ܳ�������5���<TG�����<�qX=����s= �<�򜼥_ȼ�i�;��m��<N�|���;wsK�]�E���M=�����='�C�ل���R�?�;�l;ƽ�̜��|�0�S\� ��<�=l��������<`D�#T���x�<��=Sʵ\����3	�I�=:��<�dֺW��4\;$��k=eI	���߼�3}���#<-��hP�;%��rx$��3��x�:��4�;�5�:��&��;=u���Ɨk�����tMm��<�9j�Oa�<O�k=�����l�<k���3=��b�;X3;�T��6�M�=�鼛_�<QۼX����D�4~F���W�
1�<�>=�����+J�<��Ǽ����O���*�<z'Z=���<�b��1�[�
=rx$�Y�6�V�@���<=퍚�?�;l#<	e+�Tᠼ)�=Ւ]<��;�ޙ<�B�<�9j=�=Z6ϼ���<c��:���3�<]\-��H_����v嚼퍚9j�`=�	<p�<��<�ڠ�;�B<�8�<�g<�+i%<�6$9���hP�<���<���<u`�:�]=�
�<�O�;�c<ل=;w�»�����;�)=]{=���g]<��=cЮ<��0�z�;-�q:�r=�<�5�<����
j�@�:
˖<�=)ȅ�J�պ�¢�Y�6<��2�9d��ƽ<u`\�&��<�1���1���<��<��;f�=����D=З6<��:��<n?׻��x�v,3<o*=z�<��<2$����Y��"̻��:Tn���"=�����J�;
��<}����8<��ΐ+�������<a<=O�=Y�;1X�<�v1=�P�<��Q<�[N<N�d�f׹��C���>=^1�;�Ѓ�&�l;6f~<�Q2=��y�<���<@>�����7<ċ������<���SJ<�B�e�<�(���Q�K1��r�<(b���5;������;Z}�6]���TM=����τG<��ԻD�?<~M8<"�E<���ZU"��s =�5���Ot<O�S<K1=6��<8y����E9���;R�<��=�X<y�R<�(����Z��)�����<�4�;���@1�9�+��ً<��=���<3�o<}����ɼ޺<6� ����5�����g�<���;aWT=���<Mm�;5��<���<�_�;���"���L�<|:ɻ
ּ��j���;s���
����<���<7�$=Pt����Z��Tͻ;X3�?�<
�=��o����;s�<�+"�;�x�eR���
;��=�=s���f�9=�g<������z�<���;���;�=�\h���ɼ�m�;�/���⻟��<���;��F��������?���u��� �<9ED��U,;+�j�#�<R�1�y�%<�s <l���Br�.p�����:�rx�<:���
j;ݞ�z��<z�A�F-�<�;�ً<
%=���<f��<1X輂�w�D�?=5��z�=�B;l:O�����<���<cjC��	�<�夼������'<�����;��_<�.�/��TG=�*�<(<�X�/<�_��;=�A��ZU��E�.<��<V;�<_�4=��@<F-�<8�<Yﶼ��<�=�1����<��m�<$
=ܳb<���=�~�K��d6�<�����ƒ����ॗ:��<��Z<^ �ge�<8B�A�<�&F<��T<�=2ݦ�
˖;�g�<� Y���<Eap<��^�)�J��_}:I
��<\�V<�-=�̾�Oa;���S=�&�<�l�K��Q�;R�����)<����<���;�py��&Ƽ��=�Z��n^*��R��ö<�G�;4V�;�A^;|Y�<�,<θ�<$�;��<�.o<G@�<��ͼU��X��<������<q����<�#9�^4��f��.&<��<��7<U�g��J(n�D�:s�<:l#<�;0��<��<���;Ya�<i�=4��<
�<��u�������p<�M�<O�k<�3��ΐ������~�P�ߒ�<,)���T(9��e�;��+<	�p��ڟ���f�!<l��<��=�j�<u�=�J'��x<���<2k�<P-���;|Y��"�ż��5����eI	��ö�Ѷ��"�<z̻�LټV��;zL�Qڕ�bO<-|�=�o&=<-�;G@�<�Zo� u>;p�����;ܳb�IS%��5��V��:�=<��=������Mm�<��� �;�	�gej�!A�q�M;r:~<���;�;��*�p���b�<`�<eR{<+"
���'�ҡ<�d�;e�;H_	=B�P:a<=�E<3��З6����<Ւ]=��<�D�:jc���A�Jf��&F<'��<.p0<�b�;&���쯹,ϐ<5�5��
�<p=Rα��&;�id;4�^�(<�n=<J�U���=�pD�Ԟ������(<��<%���MN�<~M8�^o�����9#=;X3;)�=S��F-Ǽ�Ά;s��üH��<g(�@fɼq�;��9=��F�`��;X3<�<�F��?S�:	Fغ��������
�mj;ꆏ<8ym97�$<��[=�[λ�B�k������<��d}2�+�j<��<mj�;}�y<l������Q���g=�K�]\-;�<���<37���N��=�<*~{���[<�KE<��<獼��;CE�<�<��<R�1=G�w�C�<���;�-��;8B<�w���夻fһd}��3��=�A<��7��U�MN�<Z�;����� $<�>x����+�<u8��2kW=f�;���;@fI���3���r<��;��<K�ļ��%=
V=���;?=ȪZ��+T=�U�<�����.��q��%S=`ɣ<($����U���'�^o�;�x����Z�cЮ<V�������M�<���ɕ;��S<���X�/<���;��"�H_	���;|:I��м�V���^i�z�����ڗ�<�0:K�;����1;V�@;�r��r��e�ʼ;����Ց�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045690
data:
>source02.
,app/Http/Controllers/DashboardController.php(d
A	file_path02.
,app/Http/Controllers/DashboardController.php(e
,	file_name2
DashboardController.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\Order;
use App\Models\Product;

class DashboardController extends Controller
{
    public function onboarding()
    {
        return view('dashboard.onboarding');
    }

    public function dashboard()
    {
        $role = Auth::user()->role;
        switch ($role) {
            case 'creator':
                $openorders = Order::where('visible', true)
                                    ->count();
                
                return view('dashboard.creator.dashboard', [
                    'openorders' => $openorders,
                ]);
            case 'business':
                $products = Product::where('user_id', Auth::id())
                                    ->get();
                $orders = Order::where('user_id', Auth::id())
                                    ->where('status', '!=', 'CANCELADO')
                                    ->orderByRaw("FIELD(status, 'AGUARDANDO PAGAMENTO', 'AGUARDANDO BRIEFING', 'ESCOLHA O CRIADOR', 'EM PRODUÇÃO', 'PENDENTE')")
                                    ->get();
                return view('dashboard.business.dashboard', [
                    'products' => $products,
                    'orders' => $orders,
                ]);
            case 'agency':
                return view('dashboard.agency.dashboard');
            default:
                Auth::logout();
        }
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0�׫9`<���id��w{<�+<�ż�,�R�<��?:����ﳠ�>�}��<m�j;s<x�^�:,<�=l������=�ġ<�m2���;��X<�ْ��R�<"��;�`���Ts<`��<�b=7e0��0F<�%<��<�����+�<a=9?�<���<[�ڻ��Wł<�E�<V���)8�<�,�����I;F�=�\r<���:*��
`�<�-��
`��xw7���L���<j�=n��=Z%��~U=�L:/���!Vy�ѐ�������;�	<t��O�p<�N[;֋�;
8�<<kj�+�(=��:��<��c����<�G��#��<��[�+h���ֆ��];q�<j��K����+=��-��kK��m=�*=���;A˚�bӻ�OL�<	�L=j���U�; m�;g�κ�3�@2L�<m/������&��Χu�1nv��x<�Z�<�cL<��-=܀�=l����<[4���&;���<�#2;=9�,���Z<(Kn�sŤ<���;��4����<?4��w��;��c��4��[�<��;j�<Y�3����;l��;�<�q�<+fw��\��OJI:� &:��2�ID=0ü%��T�o�x#�B=�6��-=
���z�m|�b}O<�ާ�ع8�^��L���������K�;ϖ0�c��%[�x�#=v�;�;ѼQz�<B��:i��;Rg���f=��H<TR�<��<xͣ��!��PB�+�(=�vּ�����>ݼ�	
��~U�e��<u�U�
`:��<�.=��v�<�T��=8��=��O;^b�<@2L=o��S����=�8�����<�	p<���<���P��o�V���F{�����Gj���~3=�~3�mЯ�=�<HW<с἞�=�CP=i�a=���<S�y��_�;i��<� &�=Z%���^<�F=o�����<t���z�ɣ����<��L=���xw7��^7=ZI���k<F{�;�8#�!�<
�<�&`<v��<l��<5"μ�#T�`��:^d����=��*<�k)��'�<qA%<h<�K-=e��;hȰ<�h?��=����<���<��=����Z=l9&��%���=�E;��<�g}��@"=����$<�!m<	ɑ�ͼ�<JB�<x#�<!�<y��sJ�%[<�׉��~U�&^x=i�8����o�@�s=�v=ʌ�;Gh^:��<�^Y<�[	=,��C=��H=u�<��漂3��S,���Y=���<�nW�D棼��=��ڼ3�:=2��b<C�|��	��}6����9&�s��;��<C�����?����<�ԟ�[�ڼ�/�;�fX<�ɼ8P�<3��JB�:�fX�j���1nv�JBʽ�M��ӯ�<b���U���:�%<�Fܼƅ�#CＱʼ�%���<U�e�?ޤ<r�i�/�
�CO�x�#=�U���z�V,�<똗���;�F\<z|�*}��Qz�<56��H�<��H�)�<�Qg<HUT�45X�r�.�O�!���%ɳ;�׼�;�d��=��}<m&=$0e����S���Au.�#C�@2�;-S��M��=Z��<o�<<�߬h=�l�K-=�W��!V�;��8OJ�<):)�7ck;1n����+��VZ��׫��x�<OJɻ��'�q��;o�V��B�������6^;J��;S�y�N��<l��<m�;��B���=*}�T� =��<=�����<�2���<2E==Z����^�D<���N;�<-Sm��s(;��OJ�<� H�*%�<�HC���<�}��CMռ�ȴż�S��T<3�;Ѓ��#��<>�-���Du�w�A=܀�u=�����u=�;ѻ
]=��<�c<�8#<`�Y�
`�<CMU���=hr�<]�w=�޼A!��B���E�r<A!��JBJ�so8�F)��K/�;���u��<�E=H��=_�c��8���g��P��<Z�优@=��<�V8��2�5Φ�����&�� Ȼ�ɶ�*Ѳ<��<���&�֋%=�3R=;*M<%��QЍ�U�*=��3�����(�t�85$����!�{�q<�%;���<�H<΄<��Ƽ�}<l�<�w��[4����(����;������ǭ���=�3�0r<�k)=����i��k����6��ɡ;;_��B=��=>�.=셍<}�]�i�9�ӻ$ނ��i <B��<~<�vV��v�<ȶ�:?ޤ�^��7c�:~0�J�<ng��*%ڼgۺ<�\r<�����R�;.�;<��;��5� !���'��(%=@2L�^�<� ��0����8���`���`�
�]�<�Wł��U����c<R�>�/��<��1=����(M3<hrĺ���Gj��V� �{<ɟv<Asi;�;	�L=Ԝj<�;Q<%[;
:�45X�ě�����;/��ԟ<�=Gj���ԟ���?<�䝻��<�F�&:�i�<��U?>;�B�<�0�;��z<�%�{$=�{�<c�1��(�;P9�����OL���*��N�;�v�u�<.���E9�<v�3���=���<��[:U��b�;�`�Y<@2̼�>�<��N<�Q=ZI�;�Z��VZ��H<w6����;?ޤ:���<���<�º<@���C�;%[=�����;�@<�ʗ;*%Z��(%=�����<[�=U��;��c����;��C��I=�E<R�<�X� �<(M3<<=��&<��<X��<�|n<5�����<`�Y�T��:�[+;�0="���^=�c*�����e��$�<��%=y=�����J��#;h�����<!R�����<�'�<+�<��
��V�0��y�<����<�<�y@<�6<=��+�B��7e�<r��k����[	<��������b)(;ZI�<��\����<�!�
��<��y����Ԟ/<����bӻ�%u�<ReR�cl��l�=OL�<���~�;��e�&^��n���<�`�<V,4=��޼�ἰ{�<#C�;<Û<r�.<m|�p��e�	=]����E<ݿ�9�6�;x��-�<\���ʼ*	=ͺ�9C��<�+S�dY=����Z�;�Ҽ�<ﳠ��[M�dW;=z��;��+h<�b��;Lr�<A��u}<l���ġ<���g��;���;Ԝ꼻 �<'���8P�<�8��D<�:��λсἨ���_���_��R�<�qA��ْ<�lp�cl
<���M��<�r�A!���P�<�Ih<HUԼ�L�<i�Ữ�;_Q=H���56�Fә:7	<�&��b�;�!X>�d���(K�<5"N����<&��I��Du�9=�;Kۘ;~�<<C����<l��:ع���i��D<���ͻ�@ļ�I�<x#<�Ϭ��1k��f�;i�&=�K�2]1� m��e�X�g��<_����$�<9=׼܀���庭��<0ϼ�K����<��x�E��P�<�YD��ѓ<x#�<{$<���<�E�@��o����<�Җ�CM�<+P��j�<+h<�^���=��P��K-��̼h��%��J��J�"<�Q�<k<q��q�<�J=$�=�^d<O�!=�4��&b���
���30��d=�o�8�(%<���;����5"N��nW<�Kϼ��<��셍��堼U�*=�
��E=(��<r.�;�!<Bb�<b)��&�)=�L�g�:�H�@:>��~U<U�e��?���=� <�һ��;�c<q�L=�w��4�	�
8¸�S����j��(%�$�=<�[<Bb�<��;4�0�ϖ�<�ާ�c�1=	�L<�$=Fә��=Z���-:� �<���ݡ<ϖ�<�vֻ�]4��ƈ<�g}�)似m|=
��<�Yf��
����<&��#�փ��=ReҼR+=�c�;��;q�̼��<�	���e<ņ�<1nv<Rg�<4���u�<F��e��<=�<#�n���P�����9j=	ɑ���<����s(<��;��*��9j;K�,=CMU�5x:�r��</�E9O�5<�r�� m�;�����<2	
<Z�d<��<�ߪ��!�;8P��,���¼���S�y<k��"�<g�N����<�j��P�<���<E:K;�����3�m�j<�Iƻ�߈;�
�t=�a;���'�<.���X�x���=��C�JBJ�&
Q:��4�+r<��0<��=?�$<!���J*�TRH�|��<0p�<��։໬\�;M�<$0�<�愽��~�:��b'���?<�qc�0�'=�~�<%[�e��<@A<���z���
2�M]S=����;~t�^bƺӱ9<-�ż�ْ���<�a!==���S�;�W�]��٦�<�H�:�;�<��,��3R<����
��6޺�K<��<s<Z��<ńm�+j�<{��;���U��<u�ջ��<7D;�G���I�����T�����<Y\�<&
Q<�J*<X����Y�� �<�Ts��q�;�fػ	�L�>G:D棺!�:왼�!����<z��oT/�Y���O���X��2�9��+<j�W��%��|��<�B	�֋�<�䝼ӯ�:&�<�8#=��=�W�:��<߬h=T��q�8=��;ϔ�:�ӻP��:r��<$0�Rg<��G<�㻺3R�����M6<T�o;oT��J�6�$ܽ<+���q�L=0O���<k����=P㗼�����V�	t<�sJ=�	
=�`�ɟ�<�[�<��;���<Y�n=	t���<���5x:<o�V;mz�<�
��]�;��;ID���@"9&
Ѽ{�ʼ;*ͼ �<������<�V�$2*<ϖ�<�I<�o<JB�<�����T�<Q$5��=q�L;Qx\<|�@�p�}<�~U����;47=���<�QE�[���#C�<[43=������ȴE<+�;Y �ZG�<�ٴ<�D<�0����O����<{��*%Z��W��P��<�$;�
��x�^<�|�<��q�l��E�;�=y�<��6;Ω��ɣ��	�L��ּ��<a�<��;N�z������H�8P�"����<Y\�<�YļWý;��<A!�ͺ<�q=R+<�h��~��{�q<b��<���<hrD<�F�����<Z�����<_��;�;
�K1���Ƽq���F�g��<���):)��nW�cjE��qA;�ʗ�	�L�Q�
����ϖ�� m��n�%=�8E<��=�ߪ���;9��P�<���;0�<+�(�ID�M���t�d��������$�;��<yd���.߼����N[�B���։`<W�=?4=���J�;�-��փ�M������<$ܽ<)8d�[��M�<OJI=(Kn<�$�:M	����=�n<��#��ʹ<�t�ʌl�{Q#=���<� ��>ݻw�<���V�<Z����J*=�;��B`߻�B�<�,x�
�={Q#=� ���ƈ<(�;�R�ޮ-=e��<���<Gj#=��<��κ�<s�$<�/��M��<�����ǭ<�K�<�i�;�o�<d�V,�<�ɔ<@��=<l�ͻ+h����R�>��<3��;��O�ė��m�/�0O�7c�<�M<M��C<�@��ȴE�+�;ņ2<M_�;p�<{Q#�����zA=�̼禺!X�<J�q<�(���&>��"�<��s�߻o��8P�<�3�<`�Y�Z��"�9?�����<i�a<~<��=}բ��nW=�Z�r�i�<kj���<\w�/�ż�]�<YZ�<�c<�	p<ID�;���<V��<�id<Y�n��8�<�B=8�9n�༬�#���;���;LȎ<|>�S��<�~U���<�5<q���p=%�<���ܞ<+j�;l�t����]�w<�׼xͣ��K;�ġ�ӯ�����<��޼�.�<���< �<��<�˼�r�<���;�2�;���<r�.<;p=F{h<���<�R;7������<<=+f�<z|�1nv=߬�<�u�<�{'<K��<7D=��<As�����M��f6=HW���A����;�:
��E����<q�8��`<���%��>��;!X��;*ͼK�=�x���Nۺ0p;�*�:��<����2	
=�s�Y\;5��V���cl
��º<}�"<q�L<߬���<9�/<V��<ʌl�ع8�B�����(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045691
data:
8source*2(
&app/Http/Controllers/FAQController.php(d
;	file_path*2(
&app/Http/Controllers/FAQController.php(e
&	file_name2
FAQController.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Controllers;

use App\Models\Faq;
use App\Models\User;
use Illuminate\Http\Request;

class FAQController extends Controller
{
    public function list()
    {
        $faqs = Faq::with('authorRelation')->orderBy('created_at', 'desc')->paginate(25);
        return view('admin.faq.list', ['faqs' => $faqs]);
    }

    public function create()
    {
        $users = User::whereIn('role', ['admin', 'author'])->get();

        return view('admin.faq.create', ['users' => $users]);
    }

    public function create_store(Request $request)
    {
        $request->validate([
            'for' => 'required',
            'question' => 'required',
            'answer' => 'required',
            'author_id' => 'required|exists:users,id',
        ]);

        $faq = new Faq;
        $faq->for = $request->input('for');
        $faq->question = $request->input('question');
        $faq->answer = $request->input('answer');
        $faq->author_id = $request->input('author_id');
        $faq->save();

        return redirect()->route('admin-faq')->with('success', 'Post successfully saved.');
    }

    public function edit($id)
    {
        $faq = Faq::find($id);
        $users = User::whereIn('role', ['admin', 'author'])->get();

        return view('admin.faq.edit', ['faq' => $faq, 'users' => $users]);
    }

    public function edit_store(Request $request, $id)
    {
        $request->validate([
            'for' => 'required',
            'question' => 'required',
            'answer' => 'required',
            'author_id' => 'required|exists:users,id',
        ]);

        $faq = Faq::find($id);
        $faq->for = $request->input('for');
        $faq->question = $request->input('question');
        $faq->answer = $request->input('answer');
        $faq->author_id = $request->input('author_id');
        $faq->save();

        return redirect()->route('admin-faq')->with('success', 'Post successfully updated.');
    }

    public function delete($id)
    {
        $faq = Faq::find($id);

        if (!$faq) {
            return redirect()->route('admin-faq')->withErrors('Post to delete not found.');
        }

        $faq->delete();
        
        return redirect()->route('admin-faq')->with('success', 'Post successfully deleted.');
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0zs�,e�<R�>��:����R�����Y��y,<Q����V=��ʕ��0a����;w� =����{��X��{=�
I=��V=@�<�J&;����A��$<�<Z��<Ds�k]���C�<��<dΚ�ۢ<�켋��<Ĵe<rIA<�=��<�ż-#�Y}F<�|�̉�;4��<�2��"=�0a<��[;���<��#�M�G<�Ԯ�	J<3ٍ�`�8��|��ç<��$=OrC�7.�J_7=��D!＝ڂ�\/켶9���{Q�x�	='B�|��;��Źh>><��-=�c�S=���<�2�:�Ԏ��@s��=r�����t��҉;nl_��D���N<)a̼����n�2<أ~=-�Z��[x;�4 =A�����<j��; q^��P����=�mD�w\M<}-W<Ɲ�<��v����ݐ;E1��x�<��y�鏲�AT4;�&<J�N�(�9�=�%=�ﳽ"?�<v|���0<���q.,=����@
�V�5:�	��9�������9��1�<��"��C�=�v��it����<��)��;�D��l<dΚ;����\�*���t;�弽�ۼ#�ٻI��;��<=�<���:�����R��Ȭ\<~s(���F=��<��6�
�����;�o��l �/���vA8��l�SO��#��<SO%��+��� �Qfk;=����B-�I�;�h��
C=���d�<p�Z<#�Y���<с5��v�<kB���(�����T�
��P�������.��w�<�7�<nl_�䗻<�
��ɛ<:h��I���{�[<���<��q=y`=�2���ͼ���;�DR��/�<N�Ź�Kf��X�<�wr���"<��!�lx7��O�<��6��k�N]����� �����<s?=�w�)a�<��<ʅo=%�<N!��((=+:_<��<�Vy�z���@=�,<bR<����X,��ݼ{�_N�:�&�Vn	��2�<�@;j��<�x���<9�=y�=�c��y`�=��s�}6���p�ں�^�}-�<��=N!��
�$�l<Mnt<��<n|�<h�ռ�J�<�$����<����2=ʅ�<��%=Yb1��⋼��O=K�<,�;"�ļW�<���:�V;:Xn<��<@9=�Vy��=i�<�S�;�J&��
;G���}f��[�=�+B=	ʼ�����rS=�"�=!G���أ�<�� ��Vy��'�Q�)=L8�;3��;E�¼Z�p;�d�;��V=x����Ҽ������;�e���=�e˹�*=1���Hk����=�����𦍽���M~�;�e���c6;n�;"?�Ȭܼ����JD"=s���@�;̉>=ݛ�<����C�/<�~+�Mnt�)��;���;���<��<��
��<̉>��f=j�$<
1����'���_��/!<����'�P��=�w�<��%��P��P,�P�X<�:�<�i��q���f<Z��R	Լ����3�;�IQ<b!�6���0վ�3Q�;�:�<��&<�-�<�
���	�<�h�;*��<P�X<1i�K���Ի`�!��~;=�DҼ��&=��: ޜ=̉�;Rv�=�.<<���<��輜7=pp.�!���L8J='�P<�=<�k��
I�T�O<�G�<����� q^<-�E=�Ĝ;�(ؼ({�;�<���G��ļ)F�;�ꤼDs<E�B�o�<Vn�<�J����7<��Y�|�<N�E;/�m�>P�<��"�A܇<e�<�H��]Z�:�҉�f�B<�ߡ����=.�<=wR=�8j�m��;�ڒ<4��rє<	ļ�!���ػF�;���5`w<�l���4=�=�L�<oEr<�=N�<H�&=b�=�����<�H<��<
@ü\=eq�;�y�<h��a'�<A(�	ca�F�;�$���a���*�z�<�C]��-�<�����=�B��� ?��IQ<⾨<Mn����=[��<��C��
�:h��$�����8�<P�X��'=)a�<�l����=��y<̉�<�P=
<<�="<��!����;#�;�����ʻ9�=iᦼ~s(=@���*����-���I�;�.�<l�㻒,��Cݹ_�:����(��nȼ�@���ͼ�ט<L�<P,��O��W�3��F<ō��j��G�9X�]<��=��I�$3+;ب:���5�;
���ݫ��{T�<��>�|��g�L8�<�߱<A���%�>�|<��伲䰼�Ճ<�Č<,b���;��9�{��<7I�<u�:���߼F�;�"	=7�r:o:�����E�B<�B��{Ѽr�m<jѺ:�A�wɋ�D!�^u��	J�)a̼4*�<^&<<\=�^�,�Ǽ~�?��#9�-�<���<����������<p�Z=� �<��C�/��7*���O��i��-�;�;Ӆ���0�<O��;�ʀ<5U	��T��y�a�K=!���&�&�_����a�<zs��'�<V^b�T��<T�O<���퇩<�2�����4�伎O5�u��<�bA�R�<<A��������W���`�<:h�<[f��=�W�����<[f��r����:���<N�ŻO߁;�!;�l��H���˼���8���<��<K�:^��;E1<��^=�OE�
=�H;)aL<��@<��F=���>�<%=n�;�/��c&�}��<d�/=��0<�		<t=�<��>�<�=�7:���<����-w�]�T�
<�;<���٭�n��<
<�*�*5�L8J��ۺ�0���4<��<�(<Ɲ�<�"��S4��b��!G=
1:��弈c=o:���<��A<��$��mԼK�a;�'�kB
=�zܼs�<,��"�����<�:��q<�� �*��<K�
�kj��>�;Yꄼؘ�<�󂼈�׻q�C�{���=��<S���C��.�����-#<
�;�`��oE�<�.L�Q����;��H�o:=����9���#�YꄺHv�;��<���;4;�⼍$�<m��<�ȶ�rdV=���<T�O=3�����(�26%�m�;�c6=�k�<rI�<�����&;ʕ�1]���;K��<^���x�;:M�<�D�:�����=���U
#;O߁�bv�$�ќ�<$�l<Orü�C�;dFG;Z�;��¼�U9<��M<��'��ټa7
��^�<�a�:�k���<�"d��|�<�?#����<Ӆ��(=P��ٳ��'R=Fg�;�;�<�)�Ϩ"��l�<��<e�:x�	�b���_W�$N@=Qө��������׈<أ����<�ǆ<l�L;>�<�e�5@<S�X,���=�.�;eZ��zܼa7
���=���Q�)=
[�<_NP����3�"�P�=v��ł�;G���'<�.<��1��ɫ;�n�������w�A�<p�E�q��Y�<K��	����5�<�U��H�;^��<��<X7�<c���>�<����v��<R�)=<��Z;�<�菻����2=�So������<�
��:��<�C]<��=O�=���<XG��D=�=���G��1��;yE����X� q^:�ʼ⣓<�R?���I<CH\<G@Ӽ}���uh�<��=`��<&��@�6��ȼ6`<e|�E1�={���<I=�z�,�<G@S�4�d9���l�c���@��Y�<���<���;�40� �=�G��R�'<��<p��<
=��<#��<~s�<s����⋼��Ļ#���ɼ:�p<s�;p��<��4���}�с5��R?��~�;��;�"	<^<v|<�G��<�<#�Y�D��*�<A�=�c;�ɛ<������%�<��<��D;�[��w�<���<B-G<�e;<%=)aL��
=\��<�R?<v��e|�:�2�������<y5�<��&;@9��@=�z�;�oi='��<�oi��k<'�P;�G�<��;���*�<�纼�<ː<����w�<G��;>Pe�ݫ;E�W<a'c���=�k��z�/��<u��tż�x�����ܼ4*�<�����e;�*�����0�j<A��[f�:SO��t�<C�/����7I1;���<�!�<����Qfk= �;��E<�l����=��<�y���1&<L��<<A���=�iu�R	ԻZ��<�T�T�f����f��<SO����U�nٝ<��޼�+�<~X<���;;&�<��;A�`�(
=����с��̉>�&���?3;�:�;{�<��r<���<���<��:�hE��y���*��	�=@9<�Y��y��=;=�(;�ߑ�Y}F<��7<x��<��ռ�����3K<��X<��=��9�C�S�<6����A�;�ۼ��<䗻�|�n="Jq<g�@9rI�<��F;�\m�o�<}-׻A�=s��;"Z���-w�˰�<v���u]�8�<�������<4��[f��sH<���%�<�;ԼrdV�)�c�g�l;����Ի.��z�<�@�<S����K�ἲ�0�SO%��ߑ�Ĵ�<���AoI��Fg;q��λ��O�Ds�;�:<Q��<���<$��So<ɼ�=Vn	���<�Lۼ<�<��7�w��Ȭ�<M~��Yc������ꔼt=i;y`<�So�#u�;Fg��E1��<�k<;��<�o�[f�<�{�3��<K��!��l��Q�;�dv<K =A��u��<�G�<���Z�<�i�<(���\�<n|��<]?�<�Ϗ<'R�<�|�<�p><D���߱�:����e;��<��<
1�G%><�
C;iᦺ q޼�t<e|q�|�<V� <p��<�5���&C;Z;D���;�����mļ�L�<b���{��<,�0<��EL+=�e=e����8�;���;#�B�b�;{9/��`�<���;�\�<��!���'=��:T$���;�������;*�<��;�8�OW�<ќʼG�;f/�<��<P��<]�Լ�{A�
@C:�
I;bm�<c�^�&���兼��*�OrC��ƼD��;&�<��t;�̅���<G%><n�<䀺>������{�[;�߱<9���2<9Ŭ<����	�;�ɫ<D!���r�J_7�ͤӼa'����啼8�<pU�<^��"Jq�>�8���<��;�)���6p��((<ł
<�<�,�<�:�<&�=R������<�;c�=,��;�d�;����d�u����6U<�-��@s��@s<]Z�<�H;�S�zs��OE�L���� �L8J=���<y5`<A܇:�w=/�m��&û�g=��<j��u���0�_�=\�*<_NP;��v�Yb�<�����8��݌<f/��������<���;1]��h�!��;�w�/A=�]B�Y�=o�0�s�`,=0��<�Y;��=��V���=�@<'�P<e|q<Q�=O=)aL<�ۻ�Ԏ<x��<Q��;���5͵�\/�<P��:��;bm�<�q#=j�$���<\/�;W�:�[�;G@Ӽ"�/�
��"Z���I<���:t�<;�<y���!��<��Ị���(=���� q^��,';v&#<eq���<T��:��w�4����~�SO���_�<<����,����{��<�
���菻/��1]<hƑ;�Z<��=W��;c���@=���;Qf�;�;Ի��<�n�< q^���;ؘ��>�;o��z{1<4��<S?�<6���w\M<
�2�j*=�4=�T=�U���<ʕ�<�1F��,��	ʻĴ�;,�G����� ���K�<�
üo:�;̉>�`�z�j�=%i�<�6�<6�;�uݼ⾨����:%=�l��1��;D<���ڌ����:=�W>< <�-w����c��<�l���̼���j���T<����1F=m�v��@<���;x����Np<Hk<��=�����<�$��ؘ�<X7�;�=��<o:=˰�<���Q���v&#=O�o�'R�<<��l�㼿��<�:$<������;{�
@�<��;����i
�&�&=�!��)F�;�iu�o��;C=<j�:��=)�c�P��(���������h�<EL+��B��lx7�h�=l�����������8�Ӆ���(�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045692
data:
=source/2-
+app/Http/Controllers/FeedbackController.php(d
@	file_path/2-
+app/Http/Controllers/FeedbackController.php(e
+	file_name2
FeedbackController.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Controllers;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Request;

class FeedbackController extends Controller
{
    public function storeImage(Request $request){
        if ($request->hasFile('image')) {
            $path = $request->file('image')->store('feedbackimages');
            // Generate URL for the stored image
            $url = Storage::url($path);

            return response()->json(['path' => $url]);
        }

        return response()->json(['error' => 'File not found.'], 400);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�Lȼ�5��̄���#�9�G<U�L��ᚼ��5<�������;�K��	?���3<1�����2�;s�=8�<l�f=�=j*K=�G�~Ü;�;����

�9�Uꤼ���<�3�<d�z�`f
����<H%��!/%�B�X=]�:q��<h��8h�ѻ�����!l<�5=��n�Y���"Z����E�@;ۊ���?=Ú-<�K����&�L��MԼ8����.л�LH=�H�<�⦼�.���V�<;�8�9����N��`2�������; �=�1�<�b=�S�Y,�n#";]�I�*wO=ʃ޼�&=�-Ľ����R�=�Bݼv��<�.P�2�]<�B���:(�t��&S:�W�=>��=�A �O}�<股;7Z��D,c��MԼ�C�:+b���%=_�廒�N��r�<<����Fb<�C;0�����=�)��������;P�H<l��;�`��M�<������;�7��Hz�q2=D��;ݠ��NA|<��N��&�B�X;>�
<�����Ӫ<�u��W�<������<}\P<�8�<=��;�논��F`�<�J�;�R��z���x;<w���_�i�<q2=��:@&=�<;05B��U^���<\��_=��"=i2���"ͼ�;�]���r;�%����;,���vz<*ȧ<�#�!�#�@��[�;k9#�@�j{�:3a�<�ef=��F�"�=!�<��<���:�I�����<�G�k�K����â�,Z2�
�
=@�<��4�<�K�<�:`f
=d�0�� `��̼[o�N�;Z,��絲=+b=<K��
�w���K�7��<�,<O�<��<�G�@N��
�潅�r>=�L�;y�<�r�������ƻ���<�=~�-���	<�-�<%�K<'�:���.�7���<a@p<ҠJ��c���<N�,<3a*<"��股<�������x8�<��7�Z�(��ݕ�b
߻8��<��`f
=|��=�#<�	/�:�30<�t�;~�-����:M�'< �=k�9�W+W<�m�:Rm��W<[$.=6N��P;�_�;�j����
=�,���<O}�<��=�����<��=�࿻�;/
=+b�=�o ��y���=�p,�`H�<#���s%<S�0;�@E�!/%��:�X�E�b�M</�+=�Y,=�p]��Z<Q��<X�E=�H��w�n�oN�<K��U�ݺi�m��5y�@&�;�O��eW�:}�t����-<V�=L�q��<�=�l-�M|�<���_�<M���==����9<���u�A<�O�<��:�ټ���;%��;��	��T�`H�=.{�;5�u��:RX���g~���"�q2�P�Ȼ�:�J�<���
ɼ85=Y�򻂀e�Ѩ�k�<�B,<��,=5YW�`{T�:�3�膼J���ۊ�<�-�X�<<K�<�q�#��r=<���ef�z��<��s�o��
;<�v��'����f�$�G=J;.:��<ۊ�<�(��::Hv�=�=�)�<�F�<�/\���
<��W<E�Ѽ��<@λ�@�:|d#<&q�=�:=�=7Z�<��<r��ٻ�պ���$�=
I<tᔼ�G��'�"�<elX<�����"������/ܼ
�
�,�����r�1�L�;����o =����\%���g��B�<�w����=󭮼�z�;������^���=�jw���<��<B<	�
ي�s&���=�x�:Mg=� /<�&}=��-�/�u���1=z���oQ=IPx�1<l"x��ש9�z�h�@;V�;oN`�Œ�<埾<��t<�e<��&=|�r<v�0=���q�����;W+W��(j���:=HXK=y6=�k��2U��U'��?������\����@E���<���<`f����μ��ɻ�>Ao��<�e�Y��:�U��6N��5�;\��<����9���d��������=oN`���^���o<b�M�7��<%��<SB<m��<ц<���=)L�M�'<��;Ao���g��HXK:�K<=c�<���A=tr���7�<L��â<�,�<����=��k����
7Z<O,2<��<-�ȼ�=(��<���1���׼��e���}A�|d�<n#��Ao�<ol'�elؼ����]1�j�4�W|/:_P�<�����J�%�K; �:���<��<�;'ּ���:�<�=����<@�<��p<�� ��{)=$����=<��MIϼѨ����=B��;_P<z��ܵc<O}
��b����I;V�y<��;�j���"�FֻK�ļ�Gn<p=��*��$e<�ɹ�S�<�ϻ�U^;�K<���d=H��:��r
=��=-�=0�����'�D��Q�u<�:=g�=?�;2�L9+��݂�;xkL��LȻM>���<,o|����:��F;*==�,��"��:J[�'���c���$��i�=��G�e9G��]����:��9<xk�:FV<�!
�(�ļ�S����U��;��%�%�ܻ�1�<E�<&S:=�"���G<���<���<��߻�y���N�%�\���G��w�$�'~x�t�=J�<�f��ie/��@�<l�f�,�=7�D�<U��9-'!=!�����W<��:h"��m���:��*<�07;s���X�$
��r�;���;�{�96�<}\мؑN�!/��w��w�ݼ��k<���<`H�;i����\�<��������˼�U�<_�v<�Ci;��=F���D_t��1I�IP�;�㲺��>�G=���/+���;|��0hӼj]\�B<	�#=֙����<��g�b<:��<8���<K�h�Ѽ��f;�~ͼ�쑻j	;����j������H<�\�����W+�<�n�b
߼:J[<����!�<��=SB<g1����=B����<��
��x���v�<�-��ɶo�"ɂ��ٖ<�ٖ;h�<�'�\�};�"��!�<��:�2պ%�\<̷�N�=oN�r���HXK��07��}<~��
�
=���T�n<��d���<w<!�<,<�;��w<��;tr�<�ϥ��I�<��4;�1�<�pݼ����ؼT�n���.<4.�஺;ycy<���<Z�(<�d;�<@�	�|<�H�̷���<���Ց��n�;<���3a���;�����2�i_<¢�;��:a���ϥ<���<�m�<'���'���=,o|���V�8�?=�i<c�<�;;*wO����
<i��[u�<r>;-	ڻU��;�'�eW�;8��<����r��<:J=2�L���=<�~�:J�<|���=�Fb=�ʚ<��y�<�
4=����<z�ּw@<�U'=5&F��]1<~T}��7f��M#�s&�������B�X=�� �0S	�]��<,o��h�Q<�͍�a��<Ճ-=���<)L�4��;I�=3a�<D_t�H%�����<|�r<;�8�ie�<�W��@�<<@ռ;PƏ<��<3�<Y��<���<=u*��z�V<�t=�,�;丼��7=���;:�R4��	���=���;�;��XI<�м���;@&;���<6�#�@�<��<d	�7Z=��[��r�<!/���k!=p�<j{�<�g~�\�;~������K��TF<�G�3��<>��<�<p=>C��fӤ�\m3<�Q=�1I<���;=�r��;�3�g�;�Gn;�<���P�<��5;��_=B��Cgǻ��1;���<Y�r;|��5&�;�=��� �P���H�<ϧs���<6�<*��;
�S�a��������pO=���;t�<���?Y&�EJ���;��<��<���J�U=xV=V����
�d��p9�Ok<�=���<�@�<��E;�;�XI�<ŒZ;m�D<�����4���ټ��.<���7	�<���2K6�ۊ%��?=�#�f�$:c��< ��<G�4��(�<阕�!����B<t�;:}�;'K�;D�9,Z2:}\P�y���PͼF䇼�w�<��:��MIO<F䇼w@=K���@ź����p�<���<a� <�9�<c�<�B��<(6�rO
�ȋ�:�=s���*:� `<8��<y纽-�<<��/==������	���2<�rʼ�Z=s��;��;�k<�h(�}z���<ʃ^����<��<�&�8�L=�̼������;�܉��d)��`U<�tb=�?�<'~x<���<t?d���r<�y�J;��6��<i��<:J���r���<��9<����@�<�$�<��<o�q<�ŉ���A=Ⱦ¼�=�<7�;l"��#��<@&�<��f��,��<��*�MI�<�б<W^�<���;TƼ)L���X��j	=�7�gm�J��<|���ِ�Ы�`��<i����)���[��u����U�UR��Ҟ�kĨ<Rmd�[u����Ǔ���p,��G=EJ=Z�(;;��_�<�张L�|�a�=�,<d���@żP�H<�"�;C����N<��k;���<��;8��<N)9���(-=���2�L=����"�<�(j����<G-
=[����d)=:J[:?Y��=��<��μ\=�	<��Ǽ�qi<�����cN�:}l<>��Q=$�m8�Z=G�\<�sּ_������<.��<��;e9�<z=
ي��;�<���;�_�z�=|��:�֝<-	Z<c�<=�oQ<��7�sz�<��ʃ޼J;.<Ű!=CgG<�\��Į<'�=U��:�>غz0h�߶
<���;����S�<��z���<}�(=N�,<O��$�<"E;t?d< ��?�<�dZ���|�S԰<<K�<#����U'<1-o�� �a� ���	<���<�[{<��~�"'R��Y=��.�A{��)�;��<���:�� <�<@��<<�e<;5�Ö<�;;ʃ^<�(�<�q�/
���A<i�<�(;�=ϒ��Z�Ἕ�V���Ҽ���O�<��8:�"��7��i��;���<<"'�;LQ�;� �<�K;�}�c�<=�07=��5<���;�

=�0�;~T��}��<`{�;>�:�^=���9�!/%�[$.=r>��#(�8�P<�Q(����M�;ۊ��D,�-'��Hv:������<k�9�[$.=r;:J=KՋ;�Fb<�N5:'~��'~x���8h�Q�t?�;}z���%���Re<U�̻��9���0�;���n#"�(�Ļo�q=��<�< �G�^�����)����;Y�#<�Wv�����\����
�+=�<$��ʚ�
I��_���Z�h������F�:=w<B�i<U���e��<xV���A <���<n�|1��"��2$�t�=��Ӽ�N=d=H�#�A�<�@żŒZ���<4�y<EJ*=�i�����r� �!�<�Z�<Fֻl"x<�3;,Z���d)=��<���<��;"'ҹz�V�l^�fӤ;�ϼ�
4<�˦<%��<W��]:🍼�o��qi��.<~T�<�-���5<D,c<ϧ�MIO���=<�]<���<�6���������#�;�
���<;������U��;�	=J�U�����LH��j�<Ls��}A<
cB=��	����:��-<�0���f<U��<�ڢ<�]�<��f�QB&�d�z���;@��3�<@�<=ie/=��,����Qټr�j<(^<G�<W^h��Ӫ���&=�2����8!<��
<�@��dZ<ͯF��=ol��=Ǜ<���j]ܼu��<�j�<ȾB;�(�<m�;/�����)=J�U<�u���Bݼ�,�<9R�;�`U�Y��<KՋ;C����v<_��<��<��ʻ
U���o�q<��=/=��$�<��ۻ���<�����&��(�<c�����<|�a��vz;�/��0=<�LH<Q�<�)<k=kH�����;Z�(��ϥ<Zۨ�m�D<�Pͼ�,�9��Z<�
�3����MԼ.p��NA�<�<!����Ҟ��K=�G��dZ<�܉�d��:�4����f;��<ʃ^��!<+D��+b�Mg���<�Z��T<�녽�d;ܵc�RX�;�����nż�p���A <(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045693
data:
Asource321
/app/Http/Controllers/OrderProcessController.php(d
D	file_path321
/app/Http/Controllers/OrderProcessController.php(e
/	file_name2
OrderProcessController.php(f
	file_type2
.php(g
��text��2��
��<?php

namespace App\Http\Controllers;

use App\Models\Order;
use App\Models\OrderApplication;
use App\Models\OrderCobranca;
use App\Models\OrderCobrancaPix;
use App\Models\OrderCobrancaBoleto;
use App\Models\Product;
use Illuminate\Support\Facades\Auth;
use App\Models\OrderDetail;
use App\Models\User;
use App\Notifications\Business\OrderCompleted;
use App\Notifications\Creator\ApplicationApproved;
use Illuminate\Support\Facades\Storage;
use App\Models\OrderFiles;
use App\Services\WalletService;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;

class OrderProcessController extends Controller
{
    protected $walletService;

    public function __construct()
    {
        $this->walletService = new WalletService();
    }

    public function list()
    {
        $orders = Order::where('user_id', Auth::id())
                        ->where('status', '!=', 'CANCELADO')
                        ->orderByRaw("FIELD(status, 'AGUARDANDO PAGAMENTO', 'AGUARDANDO BRIEFING', 'ESCOLHA O CRIADOR', 'EM PRODUÇÃO', 'PENDENTE')")
                        ->get();

        return view('dashboard.business.order.index', [
            'orders' => $orders
        ]);
    }

    public function create_order()
    {
        $products = Product::where('user_id', Auth::id())->orderBy("title", "ASC")->get();

        return view('dashboard.business.order.select_product', [
            'products' => $products
        ]);
    }

    public function select_product($uuid)
    {
        $product = Product::where('uuid', $uuid)->first();

        if (!$product) {
            return redirect()->route('orders.create_order')->with('error', __('dashboard.orders.select_failed'));
        }

        if (Auth::id() != $product->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $order = Order::firstOrCreate(
            ['product_id' => $product->id, 'status' => 'PENDENTE'],
            ['user_id' => Auth::id()]
        );

        $uuid = $order->uuid;

        return redirect()->route('orders.process', ['uuid' => $uuid]);
    }

    public function change_product($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.change_failed'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $products = Product::orderBy("title", "ASC")->get();

        return view('dashboard.business.order.select_product', [
            'order' => $order,
            'products' => $products
        ]);
    }

    public function change_order($uuid, $product)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.select_product', ['product' => $product])->with('error', __('dashboard.orders.change_failed'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $product = Product::where('uuid', $product)->first();

        if (Auth::id() != $product->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $order->update(['product_id' => $product->id]);

        return redirect()->route('orders.process', ['uuid' => $uuid])->with('success', __('dashboard.orders.change_success'));

    }

    public function process($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $video_price = array_map(function($pricing) {
            return (object)[
                "icon" => asset($pricing['icon']),
                "duration" => $pricing['duration'],
                "pricePerSecond" => number_format($pricing['pricePerSecond'], 2, ',', ''),
                "totalPrice" => $pricing['totalPrice']
            ];
        }, config('app_custom.video_pricing'));

        $hooks = array_map(function($hook) {
            return (object)[
                'value' => $hook['value'],
                'description' => __($hook['description']),
                'price' => $hook['price']
            ];
        }, config('app_custom.hook_pricing'));

        $ads = array_map(function($ad) {
            return (object)[
                'value' => $ad['value'],
                'title' => $ad['title'],
                'description' => __($ad['description']),
                'percentage' => $ad['percentage']
            ];
        }, config('app_custom.ads_pricing'));

        $services = [
            (object)[
                'name' => 'Callouts & CTA',
                'description' => 'Callouts visually highlight the most important points of your video',
                'price' => 29
            ],
            (object)[
                'name' => 'Subtitle',
                'description' => 'With subtitles you can also reach users who use social media without sound',
                'price' => 19
            ],
            (object)[
                'name' => 'Music',
                'description' => 'Music communicates the mood of the video optimally to the target group',
                'price' => 19
            ],
        ];

        return view('dashboard.business.order.process', compact('video_price', 'hooks', 'ads', 'services', 'order'));
    }

    public function delete_order($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.delete_failed'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'PENDENTE' || $order->status != 'AGUARDANDO PAGAMENTO') {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.delete_failed'));
        }

        $order_cobranca = OrderCobranca::where('order_id', $order->id)->first();

        if ($order_cobranca) {
            if ($order_cobranca->billing_type === 'PIX') {
                $order_cobranca_pix = OrderCobrancaPix::where('cobranca_id', $order_cobranca->id)->first();
                $order_cobranca_pix->delete();
            } elseif ($order_cobranca->billing_type === 'BOLETO') {
                $order_cobranca_boleto = OrderCobrancaBoleto::where('cobranca_id', $order_cobranca->id)->first();
                $order_cobranca_boleto->delete();
            }

            try {
                $client = new \GuzzleHttp\Client();
                $client->request('DELETE', config('app_custom.asaas_url')."/v3/payments/{$order_cobranca->cobranca_id}", [
                    'headers' => [
                        'accept' => 'application/json',
                        'access_token' => config('app_custom.asaas_token'),
                    ],
                ]);
            } catch (\Exception $e) {
                return redirect()->back()->with('error', __('dashboard.orders.delete_failed'));
            }
            
            $order_cobranca->delete();
        }

        $order->delete();

        return redirect()->route('orders.view')->with('success', __('dashboard.orders.delete_success'));
    }

    public function checkout($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $video_price = array_map(function($pricing) {
            return (object)[
                "icon" => asset($pricing['icon']),
                "duration" => $pricing['duration'],
                "pricePerSecond" => number_format($pricing['pricePerSecond'], 2, ',', ''),
                "totalPrice" => $pricing['totalPrice']
            ];
        }, config('app_custom.video_pricing'));

        $hooks = array_map(function($hook) {
            return (object)[
                'value' => $hook['value'],
                'description' => __($hook['description']),
                'price' => $hook['price']
            ];
        }, config('app_custom.hook_pricing'));
        
        return view('dashboard.business.order.checkout', compact('order'));
    }

    public function payment($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'AGUARDANDO PAGAMENTO') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $order_cobranca = OrderCobranca::where('order_id', $order->id)->first();

        $video_price = array_map(function($pricing) {
            return (object)[
                "icon" => asset($pricing['icon']),
                "duration" => $pricing['duration'],
                "pricePerSecond" => number_format($pricing['pricePerSecond'], 2, ',', ''),
                "totalPrice" => $pricing['totalPrice']
            ];
        }, config('app_custom.video_pricing'));

        $hooks = array_map(function($hook) {
            return (object)[
                'value' => $hook['value'],
                'description' => __($hook['description']),
                'price' => $hook['price']
            ];
        }, config('app_custom.hook_pricing'));

        if ($order_cobranca->billing_type === 'PIX') {
            $order_cobranca_pix = OrderCobrancaPix::where('cobranca_id', $order_cobranca->id)->first();
            return view('dashboard.business.order.checkout', compact('order', 'order_cobranca', 'order_cobranca_pix'));
        } elseif ($order_cobranca->billing_type === 'BOLETO') {
            $order_cobranca_boleto = OrderCobrancaBoleto::where('cobranca_id', $order_cobranca->id)->first();
            return view('dashboard.business.order.checkout', compact('order', 'order_cobranca', 'order_cobranca_boleto'));
        } elseif ($order_cobranca->billing_type === 'CREDIT_CARD') {
            return view('dashboard.business.order.checkout', compact('order', 'order_cobranca'));
        }
        
    }

    public function check_status($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }
        
        $order_cobranca = OrderCobranca::where('order_id', $order->id)->first();

        return response()->json(['status' => $order_cobranca->status]);
    }

    public function briefing($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status === 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.applications', $uuid);
        }

        if ($order->status === 'EM PRODUÇÃO' || $order->status === 'CONCLUÍDO') {
            return redirect()->route('orders.progress', $uuid);
        }

        if ($order->status === 'CANCELADO') {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.cancelled'));
        }

        if ($order->status != 'AGUARDANDO BRIEFING') {
            return redirect()->route('orders.process', $uuid);
        }

        $order_details = OrderDetail::where('order_id', $order->id)->first();

        return view('dashboard.business.order.briefing', compact('order'));
    }

    public function completed($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status === 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.applications', $uuid);
        }

        if ($order->status != 'AGUARDANDO BRIEFING') {
            return redirect()->route('orders.process', $uuid);
        }

        if(empty($order->details->title)) {
            return redirect()->route('orders.briefing', $uuid)->with('error', __('dashboard.briefing.title_required'));
        }

        if(empty($order->details->sequence)) {
            return redirect()->route('orders.briefing', $uuid)->with('error', __('dashboard.briefing.sequence_required'));
        }

        if ($order->pictures > 0) {
            if(empty($order->details->photo_requirements)) {
                return redirect()->route('orders.briefing', $uuid)->with('error', __('dashboard.briefing.photo_requirements_required'));
            }
        }

        $order->update(['status' => 'ESCOLHA O CRIADOR']);

        $order->user->notify(new OrderCompleted($order));

        $steps  = [
            (object)[
                'id' => 'step_1',
                'isComplete' => 1,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_1',
            ],
            (object)[
                'id' => 'step_2',
                'isComplete' => 1,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_2',
            ],
            (object)[
                'id' => 'step_3',
                'isComplete' => 0,
                'isCurrent' => 1,
                'text' => 'dashboard.briefing.step_3',
            ],
            (object)[
                'id' => 'step_4',
                'isComplete' => 0,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_4',
            ],
            (object)[
                'id' => 'step_5',
                'isComplete' => 0,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_5',
            ],
        ];

        return view('dashboard.business.order.finished', compact('order', 'steps'));
    }

    public function applications($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $steps  = [
            (object)[
                'id' => 'step_1',
                'isComplete' => 1,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_1',
            ],
            (object)[
                'id' => 'step_2',
                'isComplete' => 1,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_2',
            ],
            (object)[
                'id' => 'step_3',
                'isComplete' => 0,
                'isCurrent' => 1,
                'text' => 'dashboard.briefing.step_3',
            ],
            (object)[
                'id' => 'step_4',
                'isComplete' => 0,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_4',
            ],
            (object)[
                'id' => 'step_5',
                'isComplete' => 0,
                'isCurrent' => 0,
                'text' => 'dashboard.briefing.step_5',
            ],
        ];
        
        $applicationsApproved = $order->applications->filter(function ($application) use ($order) {
            return $application->order_id == $order->id &&
                   $application->status == 'APPROVED' &&
                   $application->visible != 0;
        });
        
        if ($order->additional_creators+1 <= $applicationsApproved->count()) {
            $order->update(['status' => 'EM PRODUÇÃO']);
            return redirect()->route('orders.progress', $uuid);
        }

        return view('dashboard.business.order.applications', compact('order', 'steps', 'applicationsApproved'));
    }

    public function applications_close($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $order->details->update(['accept_application' => 'no']);

        return redirect()->back()->with('success', __('dashboard.applications.close_success'));
    }

    public function applications_open($uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $order->details->update(['accept_application' => 'yes']);

        return redirect()->back()->with('success', __('dashboard.applications.open_success'));
    }

    public function applications_reject($uuid, $user_uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $user = User::where('uuid', $user_uuid)->first();

        if (!$user) {
            return redirect()->back()->with('error', __('dashboard.applications.user_not_rejected'));
        }

        $application = OrderApplication::where('order_id', $order->id)
                                        ->where('user_id', $user->id)
                                        ->first();
                    
        if (!$application) {
            return redirect()->back()->with('error', __('dashboard.applications.user_not_rejected'));
        }

        $application->update([
            'status' => 'REJECTED',
            'rejected_at' => now(),
        ]);

        return redirect()->back()->with('success', __('dashboard.applications.rejected'));
    }

    public function applications_accept($uuid, $user_uuid) 
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $user = User::where('uuid', $user_uuid)->first();

        if (!$user) {
            return redirect()->back()->with('error', __('dashboard.applications.user_not_accepted'));
        }

        $application = OrderApplication::where('order_id', $order->id)
                                        ->where('user_id', $user->id)
                                        ->where('status', 'APPLIED')
                                        ->first();
                    
        if (!$application) {
            return redirect()->back()->with('error', __('dashboard.applications.user_not_accepted'));
        }

        $url = 'https://ipapi.co/json';
        $client = new Client();
        $signature = null;
        try {
            $response = $client->get($url);
            $statusCode = $response->getStatusCode();
            if ($statusCode == 200) {
                $data = $response->getBody()->getContents();
                $signature = json_decode($data);
            }
        } catch (RequestException $e) {
            #
        }

        $application->update([
            'status' => 'APPROVED',
            'contract_data' => json_encode($signature),
            'approved_at' => now(),
        ]);

        $this->walletService->initiatedOrder($user, $order);

        $application->user->notify(new ApplicationApproved($application));

        $available_creators = $order->additional_creators + 1;

        $creatorsInProgress = OrderApplication::where('order_id', $order->id)
                                                ->where('status', 'APPROVED')
                                                ->count();

        $remaining_creators = $available_creators - $creatorsInProgress;

        if ($creatorsInProgress < $available_creators) {
            return redirect()->back()->with([
                'success' => __('dashboard.applications.accepted_more', ['count' => $remaining_creators])
            ]);
        }else{
            $order->update(['status' => 'EM PRODUÇÃO']);
            return redirect()->route('orders.progress', ['uuid' => $order->uuid])->with('success', __('dashboard.applications.accepted'));
        }
    }

    public function progress($uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('orders.view')->with('error', __('dashboard.orders.not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'CONCLUÍDO' && $order->status != 'EM PRODUÇÃO' && $order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $applications = OrderApplication::where('order_id', $order->id)
                                    ->whereIn('status', ['APPROVED', 'COMPLETED'])
                                    ->orderByRaw("FIELD(status, 'APPROVED', 'COMPLETED')")
                                    ->get();

        return view('dashboard.business.order.progress', compact('order', 'applications'));
    }

    public function file($uuid, $status, $file_uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($order->status != 'EM PRODUÇÃO' && $order->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('orders.process', ['uuid' => $uuid]);
        }

        $file = OrderFiles::where('uuid', $file_uuid)->where('order_id', $order->id)->first();

        if (!$file) {
            return redirect()->back()->with('error', __('dashboard.progress.file_not_found'));
        }
        if ($file->status != 'sent') {
            return redirect()->back()->with('error', __('dashboard.progress.file_not_found'));
        }

        if ($status === 'rejeitar') {
            $file->update([
                'status' => 'declined',
                'declined_at' => now(),
            ]);
            return redirect()->back()->with('success', __('dashboard.progress.file_rejected'));
        }elseif ($status === 'aceitar') {
            $file->update([
                'status' => 'approved',
                'approved_at' => now(),
            ]);
            
            $fileCount = OrderFiles::where('order_id', $order->id)
                                    ->where('user_id', $file->user_id)
                                    ->where('status', 'approved')
                                    ->get();

            if ($fileCount->where('type', 'video')->count() == 1) {
                $order->files
                    ->where('user_id', $file->user_id)
                    ->where('type', 'video')
                    ->where('status', '!=', 'approved')
                    ->each(function ($file) {
                        $file->update([
                            'status' => 'declined',
                        ]);
                    });
            }
            if ($fileCount->where('type', 'video')->count() == 1 && $fileCount->where('type', 'hook')->count() >= $order->hooks && $fileCount->where('type', 'image')->count() >= $order->pictures) {
                $order->applications->where('user_id', $file->user_id)->first()->update([
                    'status' => 'COMPLETED',
                    'completed_at' => now(),
                ]);
                
                $this->walletService->fulfilledOrder($file->user_id, $order);

                $applicationsWaiting = $order->applications->where('status', 'APPROVED');
                if ($applicationsWaiting->count() == 0) {
                    $order->update(['status' => 'CONCLUÍDO']);
                    $order->applications()->where('status', 'APPLIED')->update([
                        'status' => 'REJECTED',
                        'rejected_at' => now(),
                    ]);
                }
            }

            return redirect()->back()->with('success', __('dashboard.progress.file_accepted'));
        }

        return redirect()->back()->with('error', __('dashboard.progress.file_not_found'));
    }

    public function download_file($uuid, $file_uuid)
    {
        $order = Order::where('uuid', $uuid)->first();

        if (!$order) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        if (Auth::id() != $order->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $file = OrderFiles::where('uuid', $file_uuid)->where('order_id', $order->id)->first();

        if (!$file) {
            return redirect()->back()->with('error', __('dashboard.progress.file_not_found'));
        }

        $filePath = Storage::disk('s3')->path($file->path);
        $headers = ['Content-Type: application/octet-stream'];
        $fileName = basename($filePath);

        return Storage::disk('s3')->download($filePath, $fileName, $headers);
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0���;�����u���A�RԷ��w̼� ��޻�~;�<��!��<�߼��@��>�2��h ==n;G=<���<4]8=A�=_"�;w�0<4]��D���<D���^�{�\�wr}<n�G;0�j=/����X�1d����9��<�D���:G=q��<5��<��<'�4�����Jxq<�ن9:��=sDk��C���H�<�\=9��<�+@<��μ�jB=q�ȼB���HC���pۼ#4�<���;�
2<4]���!U=�޼$����<��w�VJ:X�<&-=<G���?O=l�O;N�%���X=
����^=�d�:��8=c�3��h��b�";�ܼ�H==g
F��@��"��3(Z�r�&<�ݼP.�L�-=����j绔Z��Yld<f�g�� �<�Ȗ�1�<$��<Z��D#:�����e=�^���0���;�X�?�;��l�)>�4�;�v�<�e�=<�\�)�=G𣻣x:G�p�Ix��x��ﻈ��'<F�Ż����$�M<2���c�3�ľ�<� �<7��<�q��&�#<�s�<x�=�rD=�I����A<W�<1�{���<�]<&-=�s&8<91��n��;i�>Ї<�TＣ��#â�ÉM����<�u��$=�Zc<�!U���;pi����sDk<�������,rX���<D�o<ћ��ľ�;��h`�;��s�d2żf���q�{�q��<p-���z= Y�:�3=�Q<�n������*�輹~=~{2�xB<e�V���N=5��<O�6<
>���ʸ:���=G@�D�ﺡsջ����>_=z��<�V�<<D=�܀<d�+��"һmp��z���i�5��7�:~e=�J&�����1�o�%�vl�aWļ}��<���<ۻ�<=n�x��;�e���Q�Ƿ_=�8^=^�)=��\��E
�p-��E�;�Ǿ<
��-��5�<�4ӻ�=�;"p�<���
��g�=τ�<>�����(by;"A;��+< Y漠�<��
=�>=N�_"�<�>�9 X��j¼����:��;��r=�l�<�_<U>Һ�仼�	=i=���<�մ<��r� ;�<Yl�<��<pij<�#=���=�ݼ�Aq�4]�<�w�;HC�;�Q�;���<���{�<�=I%�<p�=ۻ1;��=����-���A�;'b��*���b=-��`ü���Ь<�`<�C<���g+��e��<MS�91��1��<E�M9�8=Ϣ��ʰ�<U�;
\`��O	���<#�"�S��;u������;����$�x=0�꼣���G�<T	��@t�FJ�;�m<;�N�vr�;���M�X:�I�;\G��
=vl<�p�<a9���(�7V�I%�R�7�P����Z�-��<ĳ����<��<���<����6�';&�#��=̩��
�;��4<��>A̼,r�;Bͼ�B�<s&8��=;+ǹ�B�<��{��q�7�:�Q��<)�׼���'h����H�N�˒`��hY=V��<�0<���� <��<���<~�<}(=~옼�&=X�9=u�;G�<��;Q�&=f+�<I%�:]�<F��=Ƿ�<�ݺPLȼ:���ߎ��/p;Ix=�x�r�&��<<|Տ�I�F<��d�`3��$����<�4Ӽ�N�<�ם�)�
�@v*=MS�;*��<�g�� ;�<$����E;A:���O	=%iE=���<e��<��5���+��Co^=�b:�)���ļ��Ѽ*�;6[<����f��Ϣ��?�<`��<s=(&�;��8���<������l��
<�ڗ;�Bn:7�R�C�c���*=��Z㺵�k�]�;F�;�7=�$<���=��)=N�<�)��E躬Wi90��/�?=���<�z��x�;������&]<�u����*�=���;x���͋6���<I�F<�k>�>�§�����g�=���}(�<�8%=1�{���,�b�"������k��&=f����ػVs������I��C<�|
�)���]��dN=Ƿ=���<��ּ1��N��򚄺�A=J�W�!�D=���;+Ǻ���!��'Ӂ<F��0/�<�Ȗ<[�S�c���튥�Ix���H�<��)�k�>�'�4=����Vs�<PLH�
�F��+<����%�+�P.s;0/&=	�<���<<�)<�P?���:��	���V�<���<қs���<+�<�ȼ��<�N<�XA�GW��N{;G׺���;#4�<[e:;MSr�9OB=w6<>����`|���k��
�wŰ<���x�(<������<�����2��)��q�����O�6������z<�5d�<*�<�#<l��@�<�K\<S	��t�|�<;s����=#4	=���;��~=�Q�����:;H�hB$�����gH��d�O��e�<9�[<;H�h`W<<�`C�T���l�i��Qu��/�<彚�����#�;Co^��o%<1�C�<�'�<\G=���<m�z�ʒ����衻]�v:�j	�͋�<�
�G�;EJ���,Q;�A9�><�/��}(;s�<sDk<�ğ�
�;�U"=9J</��;8m�78��衺+���.k�;�����%=k��i����UG<������*=Bͻ��<�%���<�Eh��3=I�Ƽ�i1=�E
=�_<�� �CQ�<�=��=�/�9�[<�V3����[e:<��<���#4�<6�'���E<5��v�һ��C��_<;�~����<���+��-6�<��1�ћ�:u�<c��<I%�<�JK���X���	<��	���>��o��-)�H�=&
��O�=�}���W��z��<�q=��9��<�����)|<|FT��K��;{�¼pij��h�<!����Ь�
\�<vl<-��s�=㈼<�^Z<�`��s�<���<�
��:�ӼY�=jY��b��;��=y�l=J�$���L�q"��{׼�ڗ;N��m�<���<���|��;���;��<��ֻEJ�EW��jg�$4=��<Vs0<���;��9<i=�t�9�<		ϼ
\`��n9�{<��?;���;����O����ܻ�p[< �L<&
��'�<�ن���s� ;����>��Z<�vt�6V�.k�<��������2��jw��������K�<r�ټ��<�:G�§�<Co޻�"���B���&���5��f�;���z���d2�<�(��ƈ��sz<?D�W���~옼�<U=T\'<��q=YN�����;Ԕ�;��)�W���;P�.=l���-)<��&=��ʻ��$=��=�:=ꯤ<�)��y�<�<ԔI����<��Լf+=��(���D��A��9OB���0=�.���A����캯2꼀!ռ� �O��<�.���<��;��5�h�=;ޖ2���I<��I�]|C�ʒ�@XU<X���UG��ٿ<2 ������m=���<�h =/M�<�=1�7<y�9�&-����:Oj�<�9[=��~��w����V�		�<v�;�A�:�N����7�R;H��<}���==:� =���<�K��O�?#=x�۹mR��<�"R;uR<rb����u��_<
!�I%`<G��!ռ�g��%iŻۻ1��1�<u��<Oj<�q����;zM���@=қs<��D��n��m�z<>�����=/Mټ!�w��<��%��k�<�
2<�P�|=B����;]|C=rD�;|d�<wr}�8���
���Xl���\��s����

�~�=�]�<���<!��<��ʼ����Co^<�I<!���ʒ=L�-�b<���91��0#��*
����<��<��Ż��Z��ن< Yf<��t���W�=����W7���T�<�Q�:�s�:�&�<<=�u><#4�9'�<e<�G��.�G<���xB�-=��O��>><l�=$�=������<*��<��ּ1d�<�$���0#<,�=W�A;TzZ<l���ː<� ���n<���<�ݶ<�u�<��W�5�=������<�#c;Oj=|�u=�3B�x�������:���aԼ�=��
k�m�z�*�h��l�<|FT;x»�>w�<�\<@v*;@t<n�<O��<��ļ'�N����;恒�i�<"p;=~��J�<��`<�%<�_�;���<:��9Jxq<a9�<��;j�;�+@<u��<~{2��8^<���;���f�4<c�<�%̼}(!<N�<��&=��=�hټ&�����<�_��'5=�l��^�)=����_"�<�Z���f�<b�U��������<PLH<H%��Ь����<�_F;�ü*�=���
�G�}(!��B�:`3<���<tyɼ'�<
7�_���[e�;��z����É�;Yl�0�<H%�<�;K�<��<�P<	z��h�����)<�;<��$;#R<�����ԣ<��'�4=�\��Q�<y�l��鞼�|h��E��^;��ڼ;�1��������
=��黉#>��lP=�8��$�ͼs��c�����<<�ܼ���<�ޢ���	���<��Z�z���>Ї��|h;N;�<`2=����<.k�=�R�c�f<��A<K�<�B��f��<pi�;a9��Yl�:'b��>�2;2����";��=���L#=��=:Q�&<��L�mp6=7;τ��uR<�L�<S	���߼�m<���=�3B<�P�\)�<�Ǚ;�ޢ���M<޴e=f�绎¶;���e�ֺRc�:@��&
=�ѻS�/<�O�+;��$��	�:���}�:=�C!���0<L#�x»�Ь���O<�<�޻*�h�ћ�;^^<K��<�[;=��;&�#�Y�������ݶ<$*=��5=%K<��;<1�7<��=&��:(&��P.�����;��,��@�<::<�x< Y�U6�<*�<�f�;oi��	��ɂ<׍�<��
<�}<�A�<0/&=����J�;X�:Q�Y<s�<k�����:�S=<*C�����^����T:8�}��jg����;�.��W�;e�Ix�7����<��2<�p�C��;�%'<3{
�p-�<�oJ<<�\�(DF=��A<��n<���Š�;��9<U�;@�n���B�3���9<���;s�Q�i�躆*
�2��ջ+=��q��<��:<x��������;�t�9��2��<��~<��<�k�;.N9b�"�:��<�����l�5���rb@<6V���(<�¶�g+����;�@�<��u<��=�ڻӲ<
�Ǽ���Q�Y=�P<�==$4<��E�M���A����<
!���"��/�;���<��<@<.{�R��<mR�;�t��5�<�L��n�=RcQ<�7;�c�������=��<�1<�0H���	<$�x�1�7��<�!ռRE�<˒`=�������<q�<H�<�S�=@t<U��t�<�Ь��XA;��m<I�F�yܹ<���;jw����=ʒ=�e<f+=
����=U ��܀���<�	=��:-:b��<��;^I���)�}(�c���s�:$������~
L=���7�'b���;g~�<%K=�I:��Mż9O�<�+��޴���ʻ�d�z���zM��n4��ty�:���;�m�:.k����<.N<�4<�f�es�q/=Y��<�e&���<�C;"�U<����x�(�8m�x�[<�#��u=A����<���;;fK��k<sD���<�9=���<���5<I��<SM<F����廋�`�]���TzZ<�x�N��<�b��3B<v�Һ�dN;��<Vʻ�^��ú���2���f�;���<����<�N�мϢ?<���;c��<�üʰ����<ș�;�y<n��b�"��x;`u�Ƃ�:v���'=����G=���a�*<!�D=�Eh�^^<�\��`���S�:�5d;�|h�@XU=���<�x8<S�/���"��G�;�U�<9���<6t�;�"-<��;���<�;�]$<�H��0��<-�9?��{��ʰ�<�u�<�y<���<�S=���r�Y<��μv�<4{��T�e�	<X���]��;�2�<�}�����;�^ں�|
=pi�Z�¼�N{���E<(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045694
data:
<source.2,
*app/Http/Controllers/PaymentController.php(d
?	file_path.2,
*app/Http/Controllers/PaymentController.php(e
*	file_name2
PaymentController.php(f
	file_type2
.php(g
�*text�*2�*
�*<?php

namespace App\Http\Controllers;

use App\Services\PaymentService;
use Illuminate\Http\Request;
use App\Models\OrderCobranca;
use App\Models\OrderCobrancaPix;
use App\Models\OrderCobrancaBoleto;
use App\Models\Order;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;

class PaymentController extends Controller
{
    protected $paymentService;

    public function __construct(PaymentService $paymentService)
    {
        $this->paymentService = $paymentService;
    }

    public function pay(Request $request, $uuid)
    {
        $order = Order::where('uuid', $uuid)->firstOrFail();

        $billingType = $request->input('payment_method'); // pix, boleto, credit_card, debit_card
        if ($billingType === 'debit_card') {
            $billingType = 'credit_card';
        }
        Log::info('PaymentController pay: ', ['uuid' => $uuid, 'billingType' => $billingType]);
        $cobrancaResponse = $this->paymentService->createCobranca($uuid, $billingType);

        if ($cobrancaResponse['status'] === 'PENDING') {
            if ($billingType != 'credit_card') {
                $cobrancaDetails = $this->paymentService->getCobrancaDetails($cobrancaResponse['id'], $billingType);
            }


            // Speichern der Cobrança-Daten
            $orderCobranca = new OrderCobranca([
                'uuid' => Str::uuid(),
                'order_id' => $order->id,
                'object' => $cobrancaResponse['object'],
                'cobranca_id' => $cobrancaResponse['id'],
                'date_created' => $cobrancaResponse['dateCreated'],
                'customer' => $cobrancaResponse['customer'],
                'payment_link' => $cobrancaResponse['paymentLink'],
                'due_date' => $cobrancaResponse['dueDate'],
                'value' => $cobrancaResponse['value'],
                'net_value' => $cobrancaResponse['netValue'],
                'billing_type' => $cobrancaResponse['billingType'],
                'pix_transaction' => $cobrancaResponse['pixTransaction'],
                'status' => $cobrancaResponse['status'],
                'description' => $cobrancaResponse['description'],
                'external_reference' => $cobrancaResponse['externalReference'],
                'original_value' => $cobrancaResponse['originalValue'],
                'interest_value' => $cobrancaResponse['interestValue'],
                'original_due_date' => $cobrancaResponse['originalDueDate'],
                'payment_date' => $cobrancaResponse['paymentDate'],
                'client_payment_date' => $cobrancaResponse['clientPaymentDate'],
                'installment_number' => $cobrancaResponse['installmentNumber'],
                'transaction_receipt_url' => $cobrancaResponse['transactionReceiptUrl'],
                'nosso_numero' => $cobrancaResponse['nossoNumero'],
                'invoice_url' => $cobrancaResponse['invoiceUrl'],
                'bank_slip_url' => $cobrancaResponse['bankSlipUrl'],
                'invoice_number' => $cobrancaResponse['invoiceNumber'],
                'discount_value' => $cobrancaResponse['discount']['value'],
                'discount_due_date_limit_days' => $cobrancaResponse['discount']['dueDateLimitDays'],
                'fine_value' => $cobrancaResponse['fine']['value'],
                'interest_value2' => $cobrancaResponse['interest']['value'],
                'deleted' => $cobrancaResponse['deleted'],
                'postal_service' => $cobrancaResponse['postalService'],
                'anticipated' => $cobrancaResponse['anticipated'],
                'anticipable' => $cobrancaResponse['anticipable'],
                'refunds' => $cobrancaResponse['refunds'],
            ]);
            $orderCobranca->save();
            
            // Abhängig von der Zahlungsmethode, speichern der spezifischen Daten
            if ($billingType === 'pix') {
                $orderCobrancaPix = new OrderCobrancaPix([
                    'order_id' => $order->id,
                    'cobranca_id' => $orderCobranca->id,
                    'encoded_image' => $cobrancaDetails['encodedImage'],
                    'payload' => $cobrancaDetails['payload'],
                    'expiration_date' => $cobrancaDetails['expirationDate'],
                ]);
                $orderCobrancaPix->save();

            } elseif ($billingType === 'boleto') {
                $orderCobrancaBoleto = new OrderCobrancaBoleto([
                    'order_id' => $order->id,
                    'cobranca_id' => $orderCobranca->id,
                    'identification_field' => $cobrancaDetails['identificationField'],
                    'nosso_numero' => $cobrancaDetails['nossoNumero'],
                    'bar_code' => $cobrancaDetails['barCode'],
                ]);
                $orderCobrancaBoleto->save();
            }

            Order::where('id', $order->id)->update(['status' => 'AGUARDANDO PAGAMENTO']);

            // Weiterleitung zur Anzeige-Seite mit entsprechenden Daten
            if ($billingType == 'credit_card') {
                return redirect()->to($cobrancaResponse['invoiceUrl']);
            } else {
                return redirect()->route('orders.payment', $uuid);
            }
            
        } else {
            return redirect()->route('orders.checkout', $uuid)->with('error', __('dashboard.checkout.payment_failed'));
        }
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0J���e!�ҋ=�:�𻳑q���S�Iw�ZH<�{�;-�k�3�<at��T,<U�\�j�3<j:Ÿ<s�:=|���o�f=��
=D%��Y��#'$��:���̏��c��R2�{�= �f��]=>����x��a��]�Ӯ�<����C=᤻<d�=h];��'�e��<��<�d�a
=��w)�	���qd��j�;:������\<��׼�O���ջ;�8�:@�<�G�<�[^��ʼ�/=6�=��t���F<�ci����<λ�<��;��&<]EX=�$�<
$ϼ5Lg<�ۈ��
t=�1�:>�<Z�;]�.�gM��G�]<3!�;�j��$�/t�;�7��A�`�ʼ2�=CaN�Z���ּ��{��KȺ��<�ڊ��xP=>�9��C=��޼���<��<������������>Ž�[;=������O<�^=��q<)}D=3�<�	U���n�*�[�v%K<^��O0q�,ꁼ����
$ϼ���/�<�,���+<4HP��g�Mə���v���Y=J�2=��=�χ����#��<�:��+=�L<3!W��Y�<�Z��!�ۭļK��:�>ɼ��z�77�����ᙼ�\���Q��5�<hd�lt���N��>ɼ:�<`��Q��~f�}�d���<��R�_0���C\��Ἶ\�����;�B`�(�kZ�<Q��s�o=�ܧ���<y=pQ�:(Zb<)��=�Jk�Wm�<X��m=��t<�ྺ"�_<pQ�<��<��<�%N�<(y-�GP���<�#�<\d#<2@"=�&j=KH����;Ñ
��c:���;2��<�f�<ڊ��,��l�,��;Q��o<'u��(�<Ͽ�<�d���<<2�<i��ʗ;��<.��<��=��<!�H��u7���<���<�Gs��3�<"#�<�WG=������t���-��g�V� =PSS���&�s�������;KJ�o��;�S
=1�]:6�=<�</t;�%��X���=-�=o�='VK;�<쎒���>���W�La=�;QWj<�c���a�;��<��y<�"S;W�7=��+=E�G�K��<��*;h�:�zT�<,<^Io��<	�Ͽ�<zw�<���*^�<)A�i��"+<�J�����(f�9��F-��`�=1���2@"�o�ȼt�Q=J�P=�ļ��</<E�;>�����0ι�1;77��4廢���J�мu�������x�<�ڼ�V=FL�;|�=哄���=��6�T�ż��<X��;��B���Լ��-��jx<]Z<ƀ�v%�;ݵr<i3F;���:�ά<?�:gM<��=�Q�;~f��( ��:�l"��O0q�l^ָKJ<1�]��\<����dƻhR=�S<�_u<jy��k;�<S�<l�,��x�aW�<������:�)�?=4�;��&=Q�@�}�����\��Ͽ�;���Y�����9�Tħ��0���.u=�R�<+����*�<>����<�=��=�Z<1��9<f@=>E=����<��G�?<2�t�k;t=s��<<f�=�g��Μ���mM���6��;Q����<k;�<�mp�
$ϼ��	��f>��
�<j�
�%����<W��<��׻/t������>.��0��<���;hd�I�n��Ή<�o����x�S~c�F��<V��<��~;ڊb=����f�;��V<��ci��<�
�8Rz̻�;�#�<
O߼����˴��==��:<1@=0�ƻ�ּB�<0�{;F�޼f���躐͍;ܱ[<�P8��2<0�<�;�<�ؐ�,��<�t�;N,�<(Z�;�|=��
;�f><��p��fa</��0)���N=��<Q�@�`�����Z��I�?��;�ci�v都�C�<e�j7]�
�/=����>L#<��+:e�*���4<�+�����;#'$<��0��S��{H��WG�i8����<@ה��j�<:�;<p��:�mͼ���<����m��;�\���<쎒<Wm,=k}!<T�z<Nn���,��>=[�5�W��<]Z�Բ6�I������:�=���b8�<.p�;�_��:�����94��,�<�㼵��;�;�;����"<'u��a�����ټ�3��b�C�
����<s�;j7�<�:ک�<#'�����#'$=�.1=S��Y�e����<ʌ����<�#r=�qd9�����<����g�< [�<6�<�����E=����-3�6 �=.�[`�{{�<NK%<	�<z�<ۭ�;;b��
�%����vơ;�D7�����<��<Z9��V<�~�<c�ڼf�<�`<
���	 ���9�<���<{{�<lt<�̲���^=��<��<�L�o�H���W��$	���`�)��;��%=B>l<؂4;��:X��<�;ѻ�v�<�YA�La<��;M�7�����<�M�<?�y=ʌ���o<`/<ۭĺG�u<4%n�W&��f>��o;0-<���<�<r�ؼ�
Q���9�=����3���2�M(û!<g��<+�=��̲<2��<���=o˓<9�ټo��D���
���a<)����<=���;��o�Y���4%n9+��<�]���\}<a��_
(=b�<�xs���^��=͘];*�[<�ڊ<�V=3�-<��=�-ּE�<`ph�MG��.�<��<e��K�;�I<��%*���h��>&<��/t;:�
�<�Z�"+�E�<GP���J�l����$����<=M�r��i3F<��Y�Mə<j���w�Y��<�"ӻ7s`=��@���2�l^ֻ$�<-l���W$='u�<��=r�#��1<�[�<!�����<lt<k�C%�H�9=�|�;���D��<6o�<�E=��;5k2��#�:����NͰ<�� ��c�����<#�v<
����M@;
�����0<�:��1�<l"�<d���ui���7<��;$Y<X�%�T����1��h=��<��	��ߟ<.�M��#=J���F��;pp��j7ݼ����I̻�1�<$�<T�E���ۼ�4e�N	�<�T�<�\<�����b�<��t<?���q�:1<�<՚�o*=��~�v��8w�:Tħ�z���b'<��M�<�[޼�A;Ɉ���t<jy
�c�%==�K�n&&�5k���<�p��at�<$�/��������qt�<����x�PSӻ�=�-��۩<Pr��X�<pϪ;���Z��S0<g+=N	x������J�;;䴼vX<��B���=���k���a���� =C��<��<����ǝ<�=����dF<ui��t�<����<6��<
���.��;E)�<\�����<��˻�qd��w��͘]����<0�{�T�E�r=�u�<�?h��ǝ�Y��pϪ�q��E�<^h:���l<ř8<�h=�]<)��<j7ݼK��d�{�=�K=	m��R�;,<D��<73���_�Ɉ��~��p�߻W���j��	�<��;}�=�q ����<Z��<a�;4Hм"�<S~c<�-3=�̲;���q�v<��<�n�4%?h��m�;�c�<��;�TO<�r�:(f<�|�'u<N,ں�=2�t<��v:3!W�<��;S~c<As=,ǟ��[���Jk���$����:���<��ټ,��<�
�:��<��=s��n�<:��<�i��l.<.�M���w��X���2�g�<B>�;g+=���<��ü��2<�<[_�_0
�d����7����uD�d��O0���<^	=�
I�����.p$��M@<�X"�=��:���1��|»vؼ%̑�As��"S=�S
=j�<�jx�KH=-MB�ߜ��:���으`�ʻ�=;�<�&�<f�<"+=��K��,=٥=6����.�,����<q�v<A:U<�_Ҽat����pp;��^����<�x�<�R2<�Z�g+�<��N��=,�T����Q�;
ť<�bʼ�m�:���e��P�����=����Ӟ<y��oM�<S��E�J�P;�c�5L绑0�<e'�<�˴<�ڊ��<�Y��<��;J���v�!���;=���UF�;�XC<|�ͼ�=ێy=Wm���>��ߜ
<�e�<�&�<u�
=��7<�#.���B�#'�<�F��@�2=:�p�i3F:�������.�<���<��ټ笼�\�<_lѼ�<x-��'u<�J�<n&&��8�;I���J�2=�<��μ�

=,�;����>ɼ��;�~����mM=J���L�<��l;;b���V=���<~�Ƽ��<l���73�n&�<
�:c�Z��-����4HP<�E�<�^�:UF3=��^�E{� ���mͼɈ<�(�:�|g<s<�<���7��$;w)�<e'<Ÿ�<QWj���HT.<�
������c��X��';e��Ui;��J��|=�
�<��l�p�߼o*=������)?=�o:AY�<e�S�S>�<�i=W�:���Ui�yP�<:�p��_�<���<5	���ͻ�X=��@��T=�<�g�;�G/��94<'�?��9��=ys=��&G<�G�;Wm,<���<��b�a�<�!���#;f��<��<PSӼe���
=���<V�U��۩�Z�<w�<<��<���<e'=�+�<1����:�:=jس;,I�<�Ѽ�-ֻL�<�~;G�"=��S��~;��'����<�J�;���z�b��<��μnI<�S0������FL=1<�<��L<V���R�<��q<ڌ;���<�_<�����I;!�}����<!<��<E)�����$	��1�<�P���_�;�͍�ys=���e<�pE<3!W���=��?���e'=�ۼ�<��c�%<�<�_�<���;��>�<
$�<L$,�&/R�U�<�{�<��|<?ܼ��|��7;,��;`�J<O0q:,}<pp����<+E<(Zb����;"��~�F;O0���4��ܻe�S<���<"��������"�B>�"�<�<�I�;� ���m�<yP[�L�~<)}�;�
=��G����;�c<���|<F������I���;���)�8<�_Ҽ�9��4HлY��;=M=S�_0�;s����:��_Ҽf��;⺻��<<o�ȼD�;<�ч&�4HP��V��><t�(�Z��:hR��'u��|=����e'<��C=0�{;�C9�fa�8ww������r<a�,�Rz�:�с��I�:���<��9k}�<��Ҫ�<+�r;�i����;����M=|�<�<�O��'";^��\�=h/�<�ά;�S�<盲;���;�1�<�ۼ&;J�P=;�R�g�<*^�<Qv�<kZ?=r�;0�F:�K<}䑻�%��d=/<�[޻ܱ�;iV(<+È;��2=(Z�;)}D=��x�i3�<��n�u�
��p�<^h:�����<�X"<�a��,�T;?�<�໤�����>��0N�[`��<X;p�߼a�;ڊ�<i�<Ÿ={���b�C���һ��.�Ҫ����<v���Խ<.��;�
�<aq;!�H�����*�T�'<aW=�`���i�2���h�=7�����Z���=��'���<�bJ;�w�X�μ�:�<�;Q�-,�<���<�B`<B�
=ܱ�;���:���;���;�:�j7�;�"�<F����ߟ��9����:����*^��
𵼢=1<�s��X<�jU<N,�<�������ʗ��v���9x�Ҫ=�ۈ<�ڭ;�{H��j�"�������x=�S���!�<b�C<-���ٯ<��Ÿ���̲�F-5��
l;�[^�=�5��̼v%˼ߜ
<J�P<Ei|<���;Z�;��;>ź!~��_:旛<�*�<�@�</��'VK;����^�<9����l�<|?���� �|?$=���<���نK<��!��χ<ř8;3D�������<�X�;�D<���<���<�7�����_�-�k<ܱ�<��X=�R���8=g���/;>(=���:�;.<Iw<!~<b��;
�%�S��<k;t�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045695
data:
<source.2,
*app/Http/Controllers/ProductController.php(d
?	file_path.2,
*app/Http/Controllers/ProductController.php(e
*	file_name2
ProductController.php(f
	file_type2
.php(g
�Htext�H2�H
�H<?php

namespace App\Http\Controllers;

use App\Models\Order;
use App\Models\Product;
use App\Models\ProductCategory;
use App\Models\ProductFiles;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver as Gd;
use Illuminate\Support\Facades\File;

class ProductController extends Controller
{
    public function list()
    {
        $products = Product::where('user_id', Auth::id())
            ->orderBy('created_at', 'desc')
            ->get();

        return view('dashboard.business.product.index', [
            'products' => $products
        ]);
    }

    public function create_product()
    {
        $productcategories = ProductCategory::orderByRaw("name = 'Outros' DESC, name ASC")->get();

        return view('dashboard.business.product.create', [
            'productcategories' => $productcategories
        ]);
    }

    public function save_new_product(Request $request)
    {
        $request->validate([
            'category' => 'required',
            'productname' => 'required',
            'description' => 'required',
            'images' => 'max:10',
            'images.*' => 'image|mimes:jpeg,png,jpg|max:5120',
        ], [
            'images.max' => __('validation.custom.maximages'),
        ]);

        $product = new Product();
        $product->user_id = Auth::id();
        $product->category_id = $request->category;
        $product->title = $request->productname;
        $product->description = $request->description;
        $product->pronounciation = $request->pronounciation;
        if (!empty($request->price)) {
            $product->price = str_replace(',', '.', $request->price); // Ersetzen Sie das Komma durch einen Punkt
        } else {
            $product->price = null;
        }
        $product->save();

        if ($request->hasfile('images')) {
            foreach ($request->file('images') as $file) {
                $manager = new ImageManager(new Gd());
                $imageFile = $file;
                $extension = $imageFile->getClientOriginalExtension();
                $randomstring = Str::random(25);
                $filename = time() . '_' . $randomstring . '.' . $extension;
                $image = $manager->read($imageFile);
                $destinationPath = storage_path(config('app_custom.folders.temp_product_image'));
                if (!file_exists($destinationPath)) {
                    mkdir($destinationPath, 0777, true);
                }
                $newWidth = config('app_custom.filewidth.product_image');
                $newHeight = intval(($image->height() / $image->width()) * $newWidth);

                $image->resize($newWidth, $newHeight)->save($destinationPath . '/' . $filename);
                $imagepath = config('app_custom.folders.temp_product_image') . '/' . $filename;
                $filePath = config('app_custom.folders.product_image') . '/' . $filename;
                Storage::disk('s3')->put($filePath, file_get_contents($destinationPath . '/' . $filename));
                File::delete($imagepath);
                
                $productImage = new ProductFiles();
                $productImage->user_id = Auth::id();
                $productImage->product_id = $product->id;
                $productImage->image = $filePath;
                $productImage->save();
            }
        }

        if ($request->filled('redirection') && !Str::contains($request->redirection, 'criar-produto')) {
            return redirect($request->redirection);
        } else {
            return redirect()->route('products.view')->with('success', __('dashboard.products.create_success'));
        }
    }

    public function edit_product($uuid)
    {
        $product = Product::where('uuid', $uuid)->first();

        if (Auth::id() != $product->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $productcategories = ProductCategory::orderByRaw("name = 'Outros' DESC, name ASC")->get();

        return view('dashboard.business.product.edit', [
            'product' => $product,
            'productcategories' => $productcategories
        ]);
    }

    public function delete_image()
    {
        $imageid = request('imageid');
        $image = ProductFiles::findOrFail($imageid);

        if (Auth::id() != $image->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if ($image->image) {
            $imagePath = str_replace(env('AWS_URL'), '', $image->image);
            if (Storage::disk('s3')->exists($imagePath)) {
                Storage::disk('s3')->delete($imagePath);
            }
        }
        $image->delete();

        return response()->json(['status' => 'success']);
    }

    public function save_edit_product($uuid, Request $request)
    {
        $product = Product::where('uuid', $uuid)->first();

        if (Auth::id() != $product->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        $existingImagesCount = $product->images()->count();

        $uploadedImagesCount = request('images') ? count(request('images')) : 0;
        if ($existingImagesCount + $uploadedImagesCount > 10) {
            return redirect()->back()->withErrors(['images' => __('dashboard.products.max_images')]);
        }

        request()->validate([
            'category' => 'required',
            'productname' => 'required',
            'description' => 'required',
            'images' => 'max:10',
            'images.*' => 'image|mimes:jpeg,png,jpg|max:5120',
        ], [
            'images.max' => __('validation.custom.maximages'),
        ]);

        $product->category_id = request('category');
        $product->title = request('productname');
        $product->description = request('description');
        $product->pronounciation = request('pronounciation');
        if (!empty(request('price'))) {
            $product->price = str_replace(',', '.', request('price'));
        } else {
            $product->price = null;
        }
        $product->save();

        if (request()->hasfile('images')) {
            foreach (request()->file('images') as $file) {
                $manager = new ImageManager(new Gd());
                $imageFile = $file;
                $extension = $imageFile->getClientOriginalExtension();
                $randomstring = Str::random(25);
                $filename = time() . '_' . $randomstring . '.' . $extension;
                $image = $manager->read($imageFile);
                $destinationPath = storage_path(config('app_custom.folders.temp_product_image'));
                if (!file_exists($destinationPath)) {
                    mkdir($destinationPath, 0777, true);
                }
                $newWidth = config('app_custom.filewidth.product_image');
                $newHeight = intval(($image->height() / $image->width()) * $newWidth);

                $image->resize($newWidth, $newHeight)->save($destinationPath . '/' . $filename);
                $imagepath = config('app_custom.folders.temp_product_image') . '/' . $filename;
                $filePath = config('app_custom.folders.product_image') . '/' . $filename;
                Storage::disk('s3')->put($filePath, file_get_contents($destinationPath . '/' . $filename));
                File::delete($imagepath);

                $productImage = new ProductFiles();
                $productImage->user_id = Auth::id();
                $productImage->product_id = $product->id;
                $productImage->image = $filePath;
                $productImage->save();
            }
        }

        if ($request->filled('redirection') && !Str::contains($request->redirection, 'criar-produto')) {
            return redirect($request->redirection)->with('success', __('dashboard.products.edit_success'));
        } else {
            return redirect()->route('products.view')->with('success', __('dashboard.products.edit_success'));
        }
    }

    public function delete_product($uuid)
    {
        $product = Product::where('uuid', $uuid)->first();

        if (Auth::id() != $product->user_id) {
            return redirect()->back()->with('error', __('auth.notauthorized'));
        }

        if (Order::where('product_id', $product->id)->exists()) {
            return redirect()->back()->with('error', __('dashboard.products.delete_failed_order'));
        }

        if ($product) {
            $productImages = ProductFiles::where('product_id', $product->id)->get();
            foreach ($productImages as $image) {
                if ($image->image) {
                    $imagePath = str_replace(env('AWS_URL'), '', $image->image);

                    if (Storage::disk('s3')->exists($imagePath)) {
                        Storage::disk('s3')->delete($imagePath);
                    }
                }

                $image->delete();
            }

            $product->delete();
        }

        return redirect()->route('products.view')->with('success', __('dashboard.products.delete_success'));
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�04�{v�;�]l�N������씟�Nj����0=��+<��p�_;�	�\S�r9�m-��o<������<���;��r=)`�<�6���:�<���:��ۼ�˘�|��<8����<f:@��<���9�꼡 ���~�<d���=��<FM%=-�$<�tV;$4�;��$��Xs<y@-=��?�_ɥ��BC��_��ʅ=�����~���=�n��쇼���1��Ż�1=#��<�0/���=���epp�}V����A�l��;<l2<eд��a�;I~����˼�8�<i��B��<�����<-�L�����g�<�Ԛ��ON=��o�ļr9����.��D�<��Ǽ��,�.L�<_�ͼ�r�)�#����<I>:������;�a�<k7=Hc����<�8.<�9w�B�K�n�Q���<�r�;�۩�6n��]��;�K��.=�k=�.����=���Q��B\��K9��Pe�;+��<���0���;*�����������F��P>=�<}<�є;�.�T���Z]Y=�<=���<�����<L�<\ӗ���:_��<�;�깄��k<R{�<Mo�9���<��T��p�+֝�Lt �V�;-Q���3�<�)�;!~�
(�Ù��i�ݼ�`�;3xo���c�J���5.<���<Y"z��(ӻ�근g��K���/	�P�����;���<��0��<�Ō<�C�+�	<P��Sz�}�}��8Q=�����񣼶����;j<�6q�{V�:]�2<[�8:4�=zH�%oʺ����4~���<�8=A�l=��I=Q`��PEɼ��ǼWǏ���<�:�2:�5K=���p�_�j�d��@��a�3�9?���(<��<G�=���`�<�35<��S�=c�=��C=�s���󖼉���囻0�<u�S�����5�A=.�Ӻ������`r������'<c��6�U�dui�.̫;X��;�+�<u���@��a=.�?=we�;S�=�t3<���;M�oH	��玼1�<��=��><{v���s;�V���hq=I~=��g<��c<�k��(��;�<{u���<�Sz=KY-�G��;�
�<M㻋�<[�����<aۼ�/	���ջ�<�<y�h=��<�==L\9�u���ѻP�!�:�5����ů5=,Vm<Ӹڼ�L�p��<.�=�=����1=�|2��I�m���
�<g�¼h!=b�&�Q�(�Q��;т�<�����<����񀻻D#�5.<[���vJ=�R1��A�����l�J��h�ů5�n�y��.�<� ��҄<�,�<<�x�ӸZ<�E�=��9��_=��Y<�ZS<-Q����q��a��5�\����U=��Ļ���<�%�.L���9w�0¹���<4�N���K;��M���"=8仼�p*�=�C���<�uF�7�\�5.�<��e�;y A<�w9�5.���i>�/�Z��ӸZ<��;ʛQ:�5���f���u��M��<���< <�y�;���<4�N=�UZ<u=�S�<��;���<�.��\3�J��;U���.�<��2<�s�;�]<::�=�4���=ʼ3�G�4󦻲z��U�<$7=�<��8��hq�������<;5�;Jμ�U7��"�<�=o(�����K�|�]��<����ݻ��ü+�<�Ƽ���<B��Όf<�=��r<�,������]6�Qx<W'�<�ㅼ)`_<^��������U1�<�.߼.�<�����<�&�<��.=W's:�7���<��6�I^������P:���폦�X��=�;�s2��S����d<����ތ=��=^�=�ɸ<4</ǲ����9?=�Q��o:=��<`Ĭ<�����s�J�;'*��F��,����:����<�+����n�#��<����+�	>����Z�;6n��LT�<q�>��<�<Գ�<��;��3�<�P��s0���+�d=]�
��<���<��.���̛<��¼3�;�y�Pq=˖X8�<��X<�i���a�<W:=9��e�H=&/�;���;�����s�'�<�����y,���/��w9�������[���w���35�&M��
$=p�߼�ʅ�����}��[X`�z�o��s�<h�V<0=%oJ<ٟ����*<P�!�n�Q��⸻ש�<�B =�	���Ci<��
:�m�]Ξ<ʻ=���;��;&ʕ����j<���<���<�e뼒�=d<]Ξ<����&/r�`�Լ6��<����d�A=V���o��<=�W�_�M�Cw�Գ�;HO��=���Պ;HC�;z[��>�:f+�<�o]�Nj�<�&�;,V��������z<1��r9=� �::<�H?=�m��RA��M[�����]�F����a����.��B=we��y����E\�5sv:GH,;Q����Av�'*�<h�;���N�1��9�_�&/r;f����<��ٻ��;G�<�=J���r������Ƽ�._<(���]=d��<vj����;�固�=���s����:l��<�M�<MO;��Uڼ�
�<ep�<�{�<q>���|�r����z�3<+���(�<4��<����'=��Ӹ�<�3���8�<B
<n��<�g=���<eд�KU=��;�"�<$��`�ԻG=��<�m���d<����y@-�d�A;�p�<��<s��<~ݻΌf9�������6)
��Av<f�ϼX�=J�������K�<�3�%�"�W's;��<'�<�r�;�4����<a[�we<���R����=Z���<@����û�&�1�<L\����<�_L<��<S�����J����I�:�2��,=��{O;���;��=�b���m�<hf�;�u�3��9[�8�::<-Ѥ;{V�����;uo��i�Z]Y=du�<58�b<�u�X₻�Ǣ��ɸ��|�<�Kh<�E\�������<��;�ޯ�C?�&��Lt����=;��<S����Z�<�6�;4�:=CW�<�-�<'�˖ؼ�o:<z[�<��F<��4<_�%<���d��d���n�i�;h�<���;*��:#�(������<��W�����	=�z��拻F9�u�{�¹��Q�����<r�����<X���h<�!�_��<p�<���K�2��<3�3���l<�<�"�<B��^N�<�F�m4�����p�_=YbR<s2=�yϼ��<�!�<uO�;E���/<|���d<R;׼���<��9�n��<,�"�<�E=�(S�X���	��&�;��<�w���u#=����χm�G�g;N����={O���k�;U�S�~��K"�������A=�~%�p�<hf��HC3��$9fkw�l�6<��9�鼍Б<(�D<��p��E\����<MO;�
�����=�|��M�;uo�<e�H=\S�;���<�	׼�_)�a�<�!g<��[={O���;|��a�39¹�<S����*< Æ�X���o]<p#��z	=|�=D��<$���4�:��%=Qx�Q����<1�<��T�����M�JN�^Nn�т�:���<���MH<�ְ<y�h<<��<��h!�<ҽS���n;m��A��<o�X<9��;AA��<b9m4=��9�j��Xs�>K;S�<Mo'<Y"��3=g�;�N<�<�%�8(=����ࢼ͑�;�H��4~<h;�����(�j=���<���<�ON��۩�7	!<�V<�~<�=n
��y@-=&�)��ʼ{V':�����!��ƻV�<�;>��ʻ=<�衺d<֮�<�[���.<��?=�|U��:D�KY-=��<Ù�;�<�Y�<pC;���&�;���Hc�:�m<58<�I=`�@��TG=���a�<���<	�p���<�����#=,�<uo�;�;j<G��>�^��©�=0����k=\Sg�J��2�,=��0�i�5={�;g�;��<��<��|<o�X<�5(<'*�:�����m�I���:���F)��5K;$tü%o�;%��R{�<$4�:=P=�\�<��<>�޼
𼽭�<��9�B<ɠ�;"�=r9<�V<��=�~H�W�7��=g�.����;y��;\�V���͋<��<�쪼�;l�J<S�����+<���:�8���<Z�=��^<��='������q�;�ϡ�we�<��;���<���=�s0;�6q<�����<�����x�[�8=��><.�+���k��ʅ<j<��w�@a	=��;;5�<�!�9��<uo=�Z�<\3���A;����%��<��<�\��M���נ<�rc����<S�<��<��<Ꙙ���ü��s2���=�b�<;U=Wg˻�P���<��hf�:P+=�<��=��.��3�߆����G�rY
<	�Ȼ)0��w\;JN�,��:YbҼS��<�b=?f��,������-̼<�<����j�(<H#Ǽ#9伟��;b��;�q����'jQ;����~]���=�ͮ��k�<S��=卐�樃<�U7����<.�S:�ȵ<�����ż�񣺳���WM�(��;�<��	=&/r�3�G<�.߼��C����5=�
�Z����y��B
=��;��ż=�W���<X<=H�ɂ=�;j<�#ڹ0¹<+�1=Q��e�<�
�dui<��<Mc;�=�ҧ<���<�t3������-�2�,�$����JU=FM��怒;Mc��^9��͋�[X�;�n�ĔB;W��we=?&�;�<��z<�x=\������T6�;ٟ�<���<;��<(�;�8��,�<Z]Y=��@�|�v<Pe�����:D��w\<Ό�;��;7	��Mc<mM<&/r<<�м�rc�폦<A�l;Ù;�+F<��<�$=���=P�<k��;b�&=�g�<�*<a���;
��mM�<Ĵ����;����g��?�<:�:��G�V��<u���~]��5<Z��<W�����+�;m��b;&��<�����<�p��8�;<#9d�ȥC<�Ō���k��|U�.L{�Lܻ¹��G���JU�V,�<��#�4��j��l����<�4��Z<y�h��Ȓ<�1���ࢼ
�<<�w\<�m��0�<l�J�"ـ;&�<S���mM������s�5.�;'*y��֍��y,����;���?���)üP��W'󻙾�;��G=�N�<�|U<y��Q@P�@a	��6��h+<z	<��/�4�N�[�8��I=/ǲ<h!�j�zH<˶�;:"��f�<PEɼ���<��<��<�cx:e�H;��<��<�$�<<�м깄<�~��ʼ��<Nj.��<7<<�x=�<��Ꙙ<j��*[f<u��<<��<8<�-L���.;�c�;��;��л�d"8�Խ��tV<��=��<�=������<������$�T6^��(�<���;��<u�{<O
j��5K��~�q��;�Wͼ��</��
��t9=;�q<���we�f�O<͑_<|q=[�:"��<����$��!�;e�H��H�V��b�:<�¼,��-̺p#�<�K�<HO<Ù�;fkw<��$�=P=K���<4<U��Y݉<h!��ތ��ZS�j<�<���G�g���=�%=Ό�}Q�<CW�I~�<
�w=�A�<L\�Hc=Lt =�
���yO�����Kh;z[ ���L����P�<�ٓ����;���<�u#��e�~L�<<�<��,<B�s�&���@c����<.�?���3�깄�(�ļ�u#<�U=��>���i�M�<���R�<6<�����Z
<p#��g<���o<}�����
<R{/�q>�U�)=�RT��"�<RA<�5=6=V,l<5sv�e�H=�	=B��<��e�	��z�o�0�%=[X�;��`<��<MO�;�B�:���<��<V�0<�<}���<���<�ͼ��Ǻ��C=�,;_�<�Xs�䒉<X�<����u�</�����;2��\����������V=;�ɼM���	D;�c�<���;���bڦ;�n��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045696
data:
@source220
.app/Http/Controllers/PublicPagesController.php(d
C	file_path220
.app/Http/Controllers/PublicPagesController.php(e
.	file_name2
PublicPagesController.php(f
	file_type2
.php(g
�_text�_2�_
�_<?php

namespace App\Http\Controllers;

use App\Models\BlogPost;
use App\Models\Contact;
use App\Notifications\ContactReceived;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification;
use App\Models\Faq;
use App\Models\NewsletterSubscriber;
use App\Models\Order;
use App\Models\OrderApplication;
use App\Models\User;
use App\Models\UserReviewPending;
use App\Services\FacebookConversionApiService;
use App\Services\TikTokConversionApiService;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Illuminate\Support\Arr;
use function Spatie\LaravelPdf\Support\pdf;

class PublicPagesController extends Controller
{
    protected $facebookConversionApiService;
    protected $tikTokConversionApiService;

    public function __construct(FacebookConversionApiService $facebookConversionApiService, TikTokConversionApiService $tikTokConversionApiService)
    {
        $this->facebookConversionApiService = $facebookConversionApiService;
        $this->tikTokConversionApiService = $tikTokConversionApiService;
    }

    public function index(BlogPost $blogPost)
    {
        $latestPosts = BlogPost::orderBy('created_at', 'desc')
                               ->take(3)
                               ->get();

        $userTotalRaw = User::count();
        $userTotal = floor($userTotalRaw / 100) * 100;

        return view('index', [
            'userTotal' => $userTotal,
            'latestPosts' => $latestPosts,
        ]);
    }

    public function price()
    {
        $plans = [];
        foreach (config('app_custom.video_pricing') as $index => $pricing) {
            $plan = (object)[
                'title' => __("general.pages.price.{$pricing['duration']}.title"),
                'duration' => $pricing['duration'],
                'price' => $pricing['totalPrice'],
                'description' => __("general.pages.price.{$pricing['duration']}.description"),
                'features' => [],
                'button' => __("general.pages.price.{$pricing['duration']}.button"),
            ];

            for ($i = 1; $i <= 6; $i++) {
                $plan->features[] = (object)[
                    'point' => __("general.pages.price.{$pricing['duration']}.point{$i}"),
                    'tooltip' => __("general.pages.price.{$pricing['duration']}.tooltip{$i}"),
                ];
            }

            $plans[] = $plan;
        }

        // Hinzufügen des Enterprise-Plans
        $enterprisePlan = (object)[
            'title' => __("general.pages.price.enterprise.title"),
            'duration' => 'Individual',
            'price' => 'Enterprise',
            'description' => __("general.pages.price.enterprise.description"),
            'features' => [],
            'button' => __("general.pages.price.enterprise.button"),
        ];

        for ($i = 1; $i <= 6; $i++) {
            $enterprisePlan->features[] = (object)[
                'point' => __("general.pages.price.enterprise.point{$i}"),
                'tooltip' => __("general.pages.price.enterprise.tooltip{$i}"),
            ];
        }

        $plans[] = $enterprisePlan;

        return view('prices', compact('plans'));
    }

    public function blog_index()
    {
        $posts = BlogPost::with('authorRelation')->orderBy('created_at', 'desc')->paginate(25);

        return view('blog.index', ['posts' => $posts]);
    }

    public function blog_detail(BlogPost $blogPost)
    {
        $latestPosts = BlogPost::orderBy('created_at', 'desc')
                                ->where('id', '!=', $blogPost->id)
                                ->take(4)
                                ->get();

        return view('blog.single-page', [
            'post' => $blogPost,
            'latestPosts' => $latestPosts,
        ]);
    }

    public function faqs()
    {
        $creatorfaqs = Faq::with('authorRelation')->where('for', 'creator')->orderBy('created_at', 'desc')->paginate(25);
        $businessfaqs = Faq::with('authorRelation')->where('for', 'business')->orderBy('created_at', 'desc')->paginate(25);
        return view('faqs', ['creatorfaqs' => $creatorfaqs, 'businessfaqs' => $businessfaqs]);
    }

    public function contact_view()
    {
        return view('contact');
    }

    public function contact_store(Request $request)
    {
        try {

            $data = $request->validate([
                recaptchaFieldName() => recaptchaRuleName(),
                'first_name' => 'required|string|max:255',
                'last_name'  => 'required|string|max:255',
                'company'    => 'sometimes|string|max:255',
                'email'      => 'required|email|max:255',
                'phone_number' => 'sometimes|string|max:15',
                'message'    => 'required|string',
                'policy'     => 'required|accepted',
            ]);
            $data = $request->all();
            $data['phone_number'] =  $data['countrycode'] . $data['phone_number'];

            // IP-Adresse hinzufügen
            $data['ip_address'] = $request->ip();
            $data['policy'] = $request->input('policy') == 'on' ? 1 : 0;

            // Daten über das Eloquent Modell speichern
            $contact = Contact::create($data);

            NewsletterSubscriber::create([
                'email' => $data['email'],
            ]);

            // E-Mail senden
            Notification::route('mail', env('MAIL_FROM_ADDRESS'))->notify(new ContactReceived($data));

            $userFbData = [
                'em' => hash('sha256', $data['email']),
                'fn' => hash('sha256', $data['first_name']),
                'ln' => hash('sha256', $data['last_name']),
            ];
    
            $this->facebookConversionApiService->sendEvent('Contact', $userFbData);

            $userTtData = [
                'email' => hash('sha256', $data['email']),
                'properties' => [
                    'contents' => [
                        [
                            'content_id' => 'contact',
                            'content_name' => 'Contact Form',
                            'content_type' => 'contact',
                        ],
                    ],
                ],
            ];

            $this->tikTokConversionApiService->sendEvent('Contact', $userTtData);

            return redirect()->route('contact.view')->with('success', __('validation.custom.messagesent'));

        } catch (\Exception $e) {
            return redirect()->back()->with('error', 'validation.custom.messageerror');
        }
    }

    public function contact_getIPinformation()
    {
        $url = 'https://ipapi.co/json';

        $headers = [
            'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
            // 'Accept-Encoding' => 'gzip, deflate, br',
            'Accept-Language' => 'en-US,en;q=0.9',
            'Cache-Control' => 'max-age=0',
            'Cookie' => 'cf_clearance=W4zcmi7tgpHrLVPtdI7O6.HM9CSHxQQasIi_DVYfLJM-1699951482-0-1-b1a49a85.c3d7f540.e6a5c565-150.0.0',
            'Referer' => 'https://ipapi.co/json?__cf_chl_tk=48uuBHzXsVBe6_neKfGeS5.FsalMrMVL4QzRwCOWJpU-1699951482-0-gaNycGzNDns',
            'Sec-Ch-Ua' => '"Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"',
            'Sec-Ch-Ua-Mobile' => '?0',
            'Sec-Ch-Ua-Platform' => '"Windows"',
            'Sec-Fetch-Dest' => 'document',
            'Sec-Fetch-Mode' => 'navigate',
            'Sec-Fetch-Site' => 'same-origin',
            'Sec-Fetch-User' => '?1',
            'Sec-Gpc' => '1',
            'Upgrade-Insecure-Requests' => '1',
            'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
        ];

        $client = new Client(['headers' => $headers]);

        try {
            $response = $client->get($url);

            $statusCode = $response->getStatusCode();

            if ($statusCode === 200) {
                $data = $response->getBody()->getContents();
                return response()->json(json_decode($data, true));
            } else {
                return response()->json(['message' => 'Request failed with status code: ' . $statusCode], $statusCode);
            }
        } catch (RequestException $e) {
            return response()->json(['message' => 'Error: ' . $e->getMessage()], 500);
        }
    }

    public function terms()
    {
        $mdname = 'terms.md';
        $localName = preg_replace('#(\.md)$#i', '.'.app()->getLocale().'$1', $mdname);
        $termsFile = Arr::first([
            resource_path('markdown/'.$localName),
            resource_path('markdown/'.$mdname),
        ], function ($path) {
            return file_exists($path);
        });

        return view('legal.terms', [
            'terms' => Str::markdown(file_get_contents($termsFile)),
        ]);
    }

    public function privacy()
    {
        return view('legal.privacy_policy');
    }

    public function refund()
    {
        return view('legal.refund_policy');
    }

    public function register()
    {
        return view('register');
    }

    public function register_as_creator()
    {
        return view('auth.register', ['role' => 'creator']);
    }

    public function register_as_business()
    {
        return view('auth.register', ['role' => 'business']);
    }

    public function register_as_agency()
    {
        return view('auth.register', ['role' => 'agency']);
    }

    public function reviews_write($token)
    {
        $invitation = UserReviewPending::where(function ($query) {
            $query->where('status', 'pending')
                  ->orWhere(function ($query) {
                      $query->where('status', '!=', 'pending')
                            ->where('updated_at', '>=', Carbon::now()->subHours(3));
                  });
        })->where('token', $token)->first();

        if (!$invitation) {
            return redirect()->route('index');
        }

        return view('review_write', [
            'invitation' => $invitation,
        ]);
    }

    public function creator_profile($nickname)
    {
        $user = User::where('nickname', $nickname)
                    ->where('role', 'creator')
                    ->where('status', 'active')
                    ->first();

        if (!$user) {
            return redirect()->route('index');
        }

        return view('creator_profile', [
            'user' => $user,
        ]);
    }

    public function pdftest()
    {
        $mdname = 'terms.md';
        $localName = preg_replace('#(\.md)$#i', '.'.app()->getLocale().'$1', $mdname);
        $termsFile = Arr::first([
            resource_path('markdown/'.$localName),
            resource_path('markdown/'.$mdname),
        ], function ($path) {
            return file_exists($path);
        });

        $terms = Str::markdown(file_get_contents($termsFile));

        $business = User::where('id', 10002)->first();
        $creator = User::where('id', 10027)->first();
        $order = Order::where('id', 1)->first();

        $url = 'https://ipapi.co/json';
        $client = new Client();
        try {
            $response = $client->get($url);
            $statusCode = $response->getStatusCode();
            if ($statusCode == 200) {
                $data = $response->getBody()->getContents();
                $signature = json_decode($data);
            }
        } catch (RequestException $e) {
            #
        }

        OrderApplication::where('id', 3)->update([
            'status' => 'APPROVED',
            'contract_data' => json_encode($signature),
            'approved_at' => now(),
        ]);

        return pdf()
            ->view('pdf.vertrag', [
                'business' => $business,
                'creator' => $creator,
                'order' => $order,
                'terms' => $terms,
                'signature' => $signature,
            ])
            ->format('a4')
            ->name('your-invoice.pdf');
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0t����`w�/�}��R�L<�)�ZD[�n��:��<AJ���,�;b�
��}�;.����<�<w��<��=S�<2�=��P=��;r�;;�;�X��?�{�J�x;��/����<{�뼯 =����R�>�:5�\�֊u< B�<Qh=�G�<J.=ځ���x"�<�Z< (8<����p<����ٷ�<�h<)��<Dai;�����}��<��>��?�"���H�$��<�S=�t=�M9���h=f挼���0+�ZB����<��=�ܵ<^Y�<;B=jbF;�˳����<�P���x<��p=�Z<�M@�rp��Kx<gMG����;[�һ��.��"�{娼����ت��Z0���~<��:������=wЩ���K��;⏹�,�<Lo�=8X}�sV��녋<D�G=��:&������ҏ]<������*��A-=.��<2�3:?�<�F�:��=7rd���)<������ B;��<����x�B;�Ci���A�����5���Iٜ<`<n�<=
�M�C��:�J��z^<sՑ;.��w�l��t=�}�<a<S�;�!��V�!<����休I��S]<ȵ׼>����=��Tv�m�o<�w7��l�=��*=�h��4��|��[��ر��[��$���mn��g�ٹۼ-3g����O����kF;U]�!���Ǽń.<�"׼��(=���;ĺ�<0�=�Ӽ�����<�Zù<�E*�	�x<5%��W=#W�;���;꡵<��w��ԟ<;B��2�<(��V���Q=�%�<�=";���<��:�I5�D_&<�I<�1��:QY�����Eĝ=l,�;��<[�4�C��j�<�L�	<��<��=������<ݲ�<%��nu=~�j=Dބ=P�0���̼�#;��3=*�����޼+�=(����;h���<O�M���1.<K
F=�Z���vӼ��4=wO���\����
���V��j�<P^=R͉��g=��U<}�0<6�����X����:��Z=��9=�>��x7d<�YS�5A��OŻ��<J�x����</`
=v��Z�9<��J<j�$=��P=�!z���E<��<��L<nw�<x�B<7�B<rp<�
;�6�<�\z;��:=�=�g;���F)��VG�J�x�ə�;���>�b=�+Q����;�@B��� =^�<��Ӽ���<u�<���ռ��x�C��<F+X<'��<G�����T}�E��;�,K���;�=1�]�}2|<+g5�Y�=&��Ht%��2n;�Xo��3��o���M����<��<O=���$4�MUV<���<�h�ޘI<��<�{B<��=��H�Yݠ�nܼ�p%�����W�:��V,<�`<S;�X�<�<E���<oA�<��!=?Z��3Y<�F�<i���;B��k�<�y�+��8�ۺ�َ�'�<"��<�;a��m�n��<���;�LU<��c�ҍ�<��1:[*��5����Z7��ԭ<x5!=t<̼���;u~�*�<Y�c<B0�<+�<�&[����<0�=�F�<���<2�p��;u�\�֊u=�� <��v=X�S<�T���{d�;�<X=rr�<C�*�:��
�Ht%�ٝ1;c����=�<m��8V���軌N$;�A���@�<��R=��<4[������D�"sH��s3;�O�բ�;}��=<�Z��%=������7�;����<S����k$�w�켼����ꉼ<�Q���Ƕ;ځ�+�V<!��<Hv�<�a[�h�;���;�����-��]sA:n]^���;������: )�w�l<<m�<�X軹{B����<���<�K���]P=~y=ȳ���'��]�;D_�<�w>��(�=u�\<Zż3w�<X����E;�nҼ�̼�m����� �;������F�	��<TԻ`!>$=7�QY;��/��Y�<>�b�fiq=B0�<�1��R2���&��"^��W���=m�,���i<�f�/�n�ȳ�<a�7=�h�Iٜ�bT�\J<<k�<�Lܼ5'T�e7<�N$<�1���<��ݼ`#I=ꞼW�:<`!;���V�!<A�ȼ���;m��<fg.</�n������E��|&=�$��ٹ�:��ջ�Cp�D��:T}�����m��h�W�N�
��[<�O=��Y��@�;MS<&����ر���載��<�V%=�&��Xh<�9��t����;�P`<֊u��d�;�\��h���<��=X�<
��bR/=ń�<�mn�F)���<;� =3�*��Ci;�8A�̮��Xu���{���D;��c���<�6�˼�˺�_�<��U�G�O;��=�l����;����0F�;�S��AJ'��@�;AL�<A��<q����<Vȡ�N�;�üF)���E�ѩ�<��A�H<�W	=oĻ��;�����<����;h��G��x5�<�=7rd�����=��Dy�<�DԼ���<�*=��<��=T}��/�+�anY��w�<��;MS;�Q=�V���X��R!����:�0�<MS;���V�d<���<E�`=����	=g1;�N<�3R<�&⻠s��rO<�h��2����HX�X��<�C<c�i;���ԭ�c6=����+��<^�;��^<ZD[:kF=�3Y�i|�;�2n���-<J>��o/=U�=��r�Da�<��=N9,���5����;�=.�ջ�@<g1���'���9���K����8J>��Ğ�;(��<3w̼T�����g�bT�VG����M�t��:�R�<r�~�q��et�W/ܼ��=;g�%�^ɼ_=��d<�d=T}��N9,�nwŻ��<d����$=�Պ;5A�<�7V������8=U∼*���1<%����X��O<�t<{���D=�';g���e�ؼN9����S<�g�<a�7����<Ożd�<t�*<�r�;B�a����� �S�H����ݴ�<��=2�3��
���i�;,MN<�<�َ��j�����;��<���<�Ĉ�D�.=?�{;�=�!z�����_�Q�Lo=�d�;�E8<u;<C�z<h�W<��:����N���^4=��x��Ⱥ� ��$<ݴ��;l�V�����HѼ9�1�y���/U<�2�9�aۼ��Qh����#����M��:x�fg��B0@���=��P;���;͒���<�
�(��;�f<W-��
󊻄�=�b8��h��ر���<�Ż֊�<Q�v�<m�<��<^ظ�9���;v<�v�<�J�?���7p�;D_���"�<�-�&�<$��<�����x��wO�;0F�<�&<q��3�*=��X���A-�����D�='��vk�:�&b�����'?�bэ<$�=@d�@�<d�%!��I�<��=�B��;�Т��4=�|Lc�0��<�ò�AJ'�ֈ�����?ڼg3�<��J����;4�C<��=_�=����_?s�N�ͻ;v<��'=C�<N�M�g��9	<E�;���<��.�[������<�佼Vȡ<(�-:?Z=/b�<_=�<�ͼ����O=�F����<ٷ�<Lo���]�;�_���UO���9=~��[�=�ٕ<<m�����\l<m�o����;�}~<�O�<g�>�ݴ�<�(�<�fC=�-���<ޘ�;���<]�b<o�U=i�N�O�S����_��� <Dy
��A��OE=��1��;��=m�,<��P=���:��b��$�<b�л�0����һ��=4]�<.��;�h�����<�S������R�<'є<�G��<�<v�S�)�<����¼>A�)��>�b�/bM=���<��~��V,�d��*��{B�Lo=<#Y��$��ȳ����(=��<�#�<.��<��<���<�P`<CY<ѩļ$��<���\J���=�m�<
t,;��<�$=`�'<rr�<��2=ݲ�����;]sA�"�<�o6="�&;��.���Ǽ8՘<5��<�G�;x0<�8�<�va9����9<�<e�<ݴ�<-�E;���;����=t<̼������^I�o�պ�ݒ��'�M�4<M�����~<;����&�i��@�/;J��<�qy<r���>A=n������f=M�w��<�B�;\��;�᝼�c<���<2�;�J�-��<)�;�Պ<H�F<�+�<�va;�+<?��<�)���!z<�����
8���j=K��<��$�����MU�<���<1.=�(�������E�꡵�q
�<�@I<�h<�mg<_=0��C<h�;8�[���)��g����=X�<y�ۼ ��b�
<��Ҽ	�5���=����9�����4["��h�<�=�<}��<���<.�;��5�_�Q<���:�x����;�:���R=�/<!<o��<-��;�'?�u���c#��U�;��<��B�����ȳ����}�ٟ�<������<�*f�E���\z�%��]W�Zù�ѧ��n˻��-<A��m<V�!�0F#=;C�7��,.��qk�w��<ٝ���|�<��Ǽ� �: �<_�Q;q���5��K��;N��<�9�<'n�<u����<�̗="�麸=�(*:��;G�����<�$�<'��d�<W-���	ۻN�
��c�����<�1���o(�ޖ���;��ջG��<z��+�<.|4��1�<?�8��s��}���<Lo==�UA< �=8՘<vk2=�Xo��J�<��=h�K����l��_=�;�l����<��=���?e;�;ڼVG<����"��,�o�N9,=(��R2<�d�;��F<�
_����<O=X�<AɅ��F�^Y�;<m|<m�<������bR/��g �}��;)��;�V,=��1<5��;`�@;#W�<�!z���<}�0���s���;�><��;m=O��g���q�<�#¼5�_?s��0<�0���;�;&�;���;��=`#ɼ@^<ޖ=��}<�R(=����Լ<�<~y�<�x�<�=��~y<��-����K��;&���E�<�]׻Lo��kF���;��S=�qy<x0<-�;}�����R:��b�P��c#<	=��$<�
1<��^<�-:��<�����x��:�(*9�|�;
_�<9:�7�B�?ڼDy
��5���X�9�=�2����ҍ������4[����=zs<MUV=��Z<0�ļU∻��j<���a�7�����C�?��Y���x5���!z�c������;y}<%#�<
t���]�;�๼X��j=�0<���<��*���F<��?;al��}
=��P��0���ѼU�:�S�<�ò;��;������<�<'R6�D��<��K�|�A=�o�<|L�;��Ѽ|�����<t<�;�<g�%�G�<�[
�G.;�/N�$=��ZDۺm�=��J��ԟ<<�t<�ef=�=
;�j=�D�&��]�9�T�+g�;��ʼ��8<N��;�H�<�}��8՘<���<��=���;\���O�#<�$��j`�<��6�<��'l<i~p<��:�(���ͺ��T��ҍ==Q�;�G{�����x�=�=K=�����|��b�;m��ٟ���^�<Sݻ���oA�����<��ϻmN�.���<�Ԧ;�R�������T}��q#=٣<�	[��;N9�<{��<p%
<�|��	�x���<wO�L�^�
�=���;N�ͺ%��:�g��!�<U�<�s<oD�h��Y�=ѩĻN�
�'l���&�<�ꂼ���<�W:Yx)=Լ��ֈ2<�><1.<m=N�
����:y�<e����(�<y�<�=~y��Xo����x0<A�H9�`w<O��X�<�6�ѧ�����<Zù;�E8����;\���O9�k+;Y��<,��{d<��VI�<et<�̻��<������<&�<Qjռz�;�j�<�:<�^�;��v<�e��4=�j`=�V�<�$�;S���)�c6�;����K�缁)�<j`����<�Xo<�v�:���[�=1.�;wQK<���<�Z7<n�:�^���`<`��\z���<���:5C~��<u"e�?��<6
m<S��<�S��;��8�Lo=�vk2<d��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045697
data:
9source+2)
'app/Http/Controllers/TaskController.php(d
<	file_path+2)
'app/Http/Controllers/TaskController.php(e
'	file_name2
TaskController.php(f
	file_type2
.php(g
�Rtext�R2�R
�R<?php

namespace App\Http\Controllers;

use App\Models\Order;
use App\Models\OrderApplication;
use App\Models\OrderChat;
use App\Models\OrderFiles;
use App\Rules\FileSizeOrderImage;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Validator;
use App\Rules\FileSizeOrderVideo;
use App\Services\OrderFilterMatch;


class TaskController extends Controller
{
    protected $OrderFilterMatch;

    public function __construct()
    {
        $this->OrderFilterMatch = new OrderFilterMatch();
    }

    public function view($uuid)
    {
        $task = Order::where('uuid', $uuid)->first();

        if (!$task) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        $checkApplication = OrderApplication::where('order_id', $task->id)
            ->where('user_id', Auth::user()->id)
            ->first();

        if ($checkApplication && ($checkApplication->status == "APPROVED" || $checkApplication->status == "COMPLETED")) {
            return redirect()->route('task.progress', ['uuid' => $uuid]);
        }

        $filter = $this->OrderFilterMatch->check($task, Auth::user());

        return view('dashboard.creator.task.view', [
            'task' => $task,
            'checkApplication' => $checkApplication,
            'filter' => $filter,
        ]);
    }

    public function apply($uuid, Request $request)
    {
        $task = Order::where('uuid', $uuid)->first();

        if (!$task) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        if ($task->status != 'ESCOLHA O CRIADOR') {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_allowed'));
        }

        $filter = $this->OrderFilterMatch->check($task, Auth::user());
        if (!$filter) {
            return redirect()->back()->with('error', __('dashboard.details.job_not_allowed'));
        }

        OrderApplication::updateOrCreate(
            [
                'order_id' => $task->id,
                'user_id' => Auth::user()->id,
            ],
            [
                'status' => 'APPLIED',
                'visible' => Auth::user()->data->level,
                'message' => $request->apply_text ?? '',
            ]
        );
        
        return redirect()->back()->with('success', __('dashboard.details.job_applied'));
    }

    public function cancel($uuid)
    {
        $task = Order::where('uuid', $uuid)->first();

        if (!$task) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        OrderApplication::updateOrCreate(
            [
                'order_id' => $task->id,
                'user_id' => Auth::user()->id,
            ],
            [
                'status' => 'CANCELLED',
                'canceled_at' => now(),
            ]
        );

        return redirect()->route('task.overview', $uuid)->with('success', __('dashboard.details.cancelled_successfully'));
    }

    public function progress($uuid)
    {
        $task = Order::where('uuid', $uuid)->first();

        if (!$task) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        $checkApplication = OrderApplication::where('order_id', $task->id)
            ->where('user_id', Auth::user()->id)
            ->where('status', 'APPROVED')
            ->orWhere('status', 'COMPLETED')
            ->first();

        if (!$checkApplication) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        $unread_messages = OrderChat::where('order_id', $task->id)->where('from_user_id', $task->user->id)->where('to_user_id', Auth::user()->id)->where('status', '!=', 'read')->count();

        return view('dashboard.creator.task.progress', [
            'task' => $task,
            'checkApplication' => $checkApplication,
            'unread_messages' => $unread_messages,
        ]);
    }

    public function delete_file($uuid, $file_uuid)
    {
        $task = Order::where('uuid', $uuid)->first();

        if (!$task) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        $checkApplication = OrderApplication::where('order_id', $task->id)
            ->where('user_id', Auth::user()->id)
            ->where('status', 'APPROVED')
            ->first();

        if (!$checkApplication) {
            return redirect()->route('dashboard')->with('error', __('dashboard.details.job_not_found'));
        }

        $file = OrderFiles::where('uuid', $file_uuid)->where('order_id', $task->id)->where('user_id', Auth::user()->id)->first();

        if (!$file) {
            return redirect()->route('task.progress', $uuid)->with('error', __('dashboard.progress.file_not_found'));
        }
        if ($file->status != 'sent') {
            return redirect()->route('task.progress', $uuid)->with('error', __('dashboard.progress.file_not_removable'));
        }

        Storage::disk('s3')->delete($file->path);
        if (!empty($file->watermark)) {
            Storage::disk('s3')->delete($file->watermark);
        }
        $file->delete();

        return redirect()->route('task.progress', $uuid)->with('success', __('dashboard.progress.file_deleted'));
    }

    public function video_upload(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'profileVideo' => ['required', 'mimes:mp4,mov', new FileSizeOrderVideo()],
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }

        $user = Auth::user();
        $profileVideo = $request->file('profileVideo');
        $videoName = $profileVideo->getClientOriginalName(); // Original file name
        $videoExtension = $profileVideo->getClientOriginalExtension(); // Original file extension
        $videoSize = $profileVideo->getSize();
        $randomstring = Str::random(25);
        $filename = time() . '_' . $randomstring . '.' . $videoExtension;
        $folderPath = config('app_custom.folders.order_video');
        $videoPath = $profileVideo->storeAs($folderPath, $filename, self::profilePhotoDisk());

        $orderFile = new OrderFiles();
        $orderFile->order_id = $request->order_id;
        $orderFile->user_id = $user->id;
        $orderFile->path = $videoPath;
        $orderFile->name = $videoName;
        $orderFile->extension = $videoExtension;
        $orderFile->type = 'video';
        $orderFile->size = $videoSize;
        $orderFile->sent_at = now();
        $orderFile->save();

        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.videosuccess'),
            'orderFileId' => $orderFile->id
        ]);
    }

    public function hooks_upload(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'hooks' => ['required', 'mimes:mp4,mov', new FileSizeOrderVideo()],
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }

        $user = Auth::user();
        $hooksVideo = $request->file('hooks');
        $videoName = $hooksVideo->getClientOriginalName(); // Original file name
        $videoExtension = $hooksVideo->getClientOriginalExtension(); // Original file extension
        $videoSize = $hooksVideo->getSize();
        $randomstring = Str::random(25);
        $filename = time() . '_' . $randomstring . '.' . $videoExtension;
        $folderPath = config('app_custom.folders.order_video');
        $videoPath = $hooksVideo->storeAs($folderPath, $filename, self::profilePhotoDisk());

        $orderFile = new OrderFiles();
        $orderFile->order_id = $request->order_id;
        $orderFile->user_id = $user->id;
        $orderFile->path = $videoPath;
        $orderFile->name = $videoName;
        $orderFile->extension = $videoExtension;
        $orderFile->type = 'hook';
        $orderFile->size = $videoSize;
        $orderFile->sent_at = now();
        $orderFile->save();

        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.videosuccess')
        ]);
    }
    
    public function picture_upload(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'picture' => ['required', 'mimes:jpeg,jpg,png', new FileSizeOrderImage()],
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }

        $user = Auth::user();
        $orderImage = $request->file('picture');
        $orderImageName = $orderImage->getClientOriginalName(); // Original file name
        $orderImageExtension = $orderImage->getClientOriginalExtension(); // Original file extension
        $orderImageSize = $orderImage->getSize();
        $randomstring = Str::random(25);
        $filename = time() . '_' . $randomstring . '.' . $orderImageExtension;
        $folderPath = config('app_custom.folders.order_image');
        $orderImagePath = $orderImage->storeAs($folderPath, $filename, self::profilePhotoDisk());
                
        $orderFile = new OrderFiles();
        $orderFile->order_id = $request->order_id;
        $orderFile->user_id = $user->id;
        $orderFile->path = $orderImagePath;
        $orderFile->name = $orderImageName;
        $orderFile->extension = $orderImageExtension;
        $orderFile->type = 'image';
        $orderFile->size = $orderImageSize;
        $orderFile->sent_at = now();
        $orderFile->save();
        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.avatarsuccess'),
        ]);
    }
    
    protected function profilePhotoDisk()
    {
        return 's3';
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�
ݻ�iY�f�i�gԼAX�;n�?�R���%�<)�t���џ������B߻�Ä��!A�E`�<�<���<{�<P$P=��
=YQg��;�X�u�5�o���<���XB=��9ؙ<Le��lW�������	=�B_<RR%=u�5�#��<[�<��
�����B<���;V��<�/j�\�b��;f��<���<ց�<'h��t=�*<�	L9�?a���軽��:Z��<է�<��E�6�V=u����-	�a����h��¼�4�<�h�<ډ纭q�<L�;�3��0=��ډ�<.$�!�==Px�G���<vb;�̼;��<w=��мٯѽ��ռa�h;��D�����_
=�Mi����;_��<]�:�+��������Ի�`�<��4=�
���S��џ{�X�<��!�(��:E��;KB�;�ӻ��y�����k84�o=ӝ=f���=�H��QF��v���N�k��%�<�b��X4&�&W���n%�pJ���5��Co�����v� <i�I=khj�L��<TF�.T�<�/9={�A�8�<|��<mf	���w<n��<����������Q�<�jy��x�M����3����G����vA<�?@��2'=r�U<Fǂ�^3��h�b~~��󺻝���	ϼ?�7��!�<Re=C���?N�����.�>:�N��6!�<YQg���p<_����=��O���
=?a�<L���,˼N]/��d�<]�����<<�x��~,=�F�;r�5=����|λ��h=_�'��<>t�ӝ��PG=+	�<�q=��)=�A��	L9�\�g�"r���0�:¶�r�U;�Zr=�{���(�<�E��A8��R��&����<��<KB�;a�h��c=��<'�޼m��<��=�U=V�f�_.�P���U�8��:<�ȼ.:����<rH
��� ;@�;x�l��6�꩓<�=Pg{�"����<
�����+��Z�� �;&�=�/9="r�tRV;ϕ���λ�/j��]�}<�=G�=�N�<
�<��"�<WG=���<v�˺	|o��K�<�)=<v�<4�5�t�<=��5�=ʡ<u��<����=��:�=��<���L<E�;�=eV�<D��;=�<�7���怼v��;����A�L�=�"Q<�&�q�J:ϕ�<�1=ƫC<&����;8>A=�h���%��<@~ͻ�L�c岼b�'���<��T;����ჼ��6�E0�:
��z�=��A�ž8=�H��6d+�Dμ���e*���C<xZA<
�<���;�G<!us�i����e*�;�w=�:;�n�;:�A<�A�6�<�C�j�������ۼ�&�<�g�����<i�><�46��'κ�����(=<���ץ=l�)��<���v���N��Y�<��;,J	=��;�{��.gJ<��/=� Ҽ�d�'h�E0�Re�<�W���<��¼��w�0��������<�l�;6%��?@<�S�8��=[�\<��4=��6=K�z��dl<�n�<#<�6�<Y<;,J	=b~~���#<Y�=�Պ=�Z <;Y!�KBϼ�<�6�C�-��$=������;���.�3��<�����j�,J��C�"<�++<�o�Y<�a=�wa�ؙ<��|���=�Y�N��uR��F<<�an=g�<`1=��RR%�[Ѽ>t=`1�:��#�+���b�;�tB�'�<-7��
�#�:��P�=N�<[�1=����j�;4�5=Y��T�<*و;i^�;��p�£�;b�'���2��*<��׺;��;
A��W�F<�sS=!u�<n@�=aNH=4�;�B���a��<	����x=�6=��<j�<Pg{��˼�D�<Y��0�?��r��c�<+Ɠ�[<����/;r�*<-7>�B.<���#`�����<XwѼ+�<�
=����VZ��j������j��.T�<�ջ�D��%'�;Ђ���B.<&�<�sS;�h��S�[���;=N��<�"ѹ{u�����e��j��p�<��*���P=��
<r�*�����ډg�	9�<���<��<_�R;V�ۻ�R5����[O�iq=��3����<mf	=�.����\���&�G�C�i���Ҝ���:+�I<]��<4�<u��<[O�<;Y��Z+}��C���>t=Vm�6%�
��<�r���<H�#�1�*�=
M����;�<
A�<�t=��3;�]?�}m=�$=��<���&��T廫g�<S��:Wû;��ڜ�;�~�����玳����������o��� �\<�����<}�<����õ;`1�<f�<i���7��<�=�;��<b;�<c��<�L=�
���Z���W"�&����d���)<=Ҽ�6�<�
�;�[�::�<R��<�9�'h����F��<z�<�xq�n�j���<Ih�:�k�X�|�+��g�<�k<�;=����J�C�ؼ'�^<��q<�N��w�<g흼��V<AX�.gʺ�E�<|��7�X�����<�u<y�<�W�[<���=u�
<�k���y�����_�R��(����A;#�=�{��<��<��)��WS<�'��VZ=@q��d
<����;��:�QF;��=k%��c�<H�#<��=<�V����<���<�M�<��
�]�<�qu<������<�W�<i^����<�c̼s5:����e��YQ�9H��<�ջ��L�<_
~�����#�=��8�JU�;w�V=8�<ǅ�<I8���C��T�opU����#0�S�[�_�'=e�޺�p=���;�������=ݖ<n@��[0=��;���<�n�
&O����<#���n����l�:�������}m<��B<�=⼌K�<�%p;Q�:<��6!<�Ѝ<����������<;F,�?N;�P&<�Y=��£ػe�޼AҌ��Co��$/����<���<�3��m��F<�I{.<*4�����d���ة��"=���<��a��%�::<�#@=jK);_���T,��)�t���<:?�b<��U<����To�o�v1�_��<�&�<
&�<��<��!<̽z9=ҼE`N��
�<�8</A`��<�7ռ+�F
.�	���"������/�:�_��<0�J���7�������ˠ�gڨ<E���W<��������
=}����ܼ�E�<�k7���X!��#�s=�����;=]��cҽ;D�c<�=b�	L9��,K=UI|;Q�廕5F<����.T�<�5��d|=��P<r����=�����
�;��;b�'�6w =A(-:�C����;�(�:��3=���`��;�G�;�2';����<��<�Z���~,<�E���D�}��B_��ջ�h���:��-��j��<<��<ˍD���<���7$��T�<�i���e*�!2�<��n<^�=���9��@�x�aa=;�"<ڜ�<0�J�{m<=�!�		=x�a<��:����X���#@=r��`t2=b~�<��<V���I{�;�ǒ<= �:�(���46=I��DN<%}^���
�Q��;�!�<>t<�a�<�2����<�����\P�CV=]Y�;	9D<�gZ��ʱ<�=���<6w ;ˠ�9E�y����<�ٻH�N=�]�����RR���9���X�<��:�	����=�Ȣ���!:O7�<VZ<��<3IK;���r�*��(�ϕ���ο���,<��D<;��=��=pJ��,˼�xq<i��<��e���L=~)ͼ�!A;��&�� ��I8�>t����<��<o������=1<�d���ڇ��M��9�=��b<1Y�ž8<v�K<�R�#��<K�#=|��;c��<b~~<�]�<�D�o<P[�ٯQ���S=�
�<џ{��L�<��<����>�<P�<^𼼟�G��M��p@<�=�F�:�]��l&�o=���;w�+<�>�<���;��><�������<Q��Ђ�<џ{��0�<ž8��rd<�����Z��჻l���a�輘�Q�\��!S<ډg�v��<l�����;􀊼'T<:��x*=�$�;]F�<���f����;�Zr�[��<0v:�\=|���!<^p<��;Z�<>t=�^O�0�=�ɑ9�65;p]`<�;fC>=m�4�xZA<�J�����{��<��*<WG���s�<;�L<Pg�;X=a���P��U�;
&ϼ=ݖ<C�"<�|<�d
=����G<��<g�<�Ҝ;£X��sS=k{�<t��������;��;�r��C=l��2,�9��q;��;��=��<e�^��i=&ɼv�;S���
���F��<v�m��:��<T,�;�_�;��<x��<џ{<��C�����-=B��L�9;���AkX�P�<c<��.�<����khj<�(��� ��Tƻ��`���-<^���E#�NJ:���J����<�I�:�Ҝ<�/=f��I8��ci������;�U��op�<��V�2���<�<iq�<�����T<��$<p@<hǳ9|�L=Y���=�~�=�q����=w�V<�'<��ǼV�;<�
<�%����<,J����_;�65<̽����==Oؼ�&�;�V�;,��<��T�g�(=p���z�;��F:�!�;���P��K/Z�
��9�v�<�/�;Ih9<}�=���<�cL��:<���<u?a�B��<q�ʼ>t�ݤG;a�;'h�<��#�����n��D޻�Mi�O���,�)�g�(=s5��xZ�;ˍD�+9��ց|�,��:���:�v<��#�fC�<:l����<�
>=#`=����S���
�g�<#��<��F=Qx�<������;�=r���?@�o�>�����;���P$�;���<;Y����:t" ="��;�{
��{�;�an<E<rH�<���<6��<�\=(U���J<z��;AX�<��/<c�����:X<�<�S��<A��􀊼������2��$/<cҽ�ϕ/<p�;n�J;����rd<Z�=e�~;�����<2<o���.;/�4��`<fC�<��;`1��]�}<.:<{m�\lG;j�T��I[�_����P$P�	L9���D�7���Y��T�'h�;>�<�9���	ϼ�xq�YQg<�q���,�<�.{���<��I<w��<�PW�I{.<�%�;��;�͟�a�<�Ѝ�"�<��,<��V�`�]<ˠ��gڨ<�E�;�x����5�@��	�j�=Qx�<�=���;�
><������ڼ4�
=�tB:�R�����Mi����<rH
=[<�+����<��d�"��u�;V�漖�=%'><#`�<VZ������Xd�<
&O<�^O<k%?�pĔ:��"��k��7�a<^�<�=�=Q�:=0���(�<���<��L���-=ؙ;���<%:�<"�2��W�����;i�I��r��%:����H<�=0�=�M<4�*<�|N���<�韼籼�8�;Ɂ<6!�;6�����<�W��C��;p׉��.<P�_��<^p<o;�Y=ؒ�;�A��Kڻ�LI<j�T<��<3���X9��;nS<�Z �B�<����3���7Q�<崝��i�< E��O��<�!�<p׉;���;�כּ�(�= B=�.<�	:�<k'<{m<ٯQ�[�ܼ>�W����<���L�D��=		�<�'�����<v���!ܧ<.��<,J�<��v���9�=T�< ��^����X<���N]�<eV3��k�<�q����<�J;�hI<;F�<Y�;��;<�Q;+���(��]��<�.�;�H;�����韼��<�6<o�<nƻÐc�2\@<�~��λ<�3�3����;X������;��:I%=^3h�B����U�v1<�|=�v���;�U��Q�;G:�<��&ɻ�L=WC��Q<yP����6!�;�=��<Tof<JUD��~,<+��8���<m����>ѻXd\�<v�<4#�;��W�e�~���<�~��6��<Pg{;RR���&߻�ȼ�Պ<�<���<r��.�u���ܼD��9�A�:��<z4׻���;Ժ[;X�<	|o�������@�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045698
data:
@source220
.app/Http/Controllers/UserProfileController.php(d
C	file_path220
.app/Http/Controllers/UserProfileController.php(e
.	file_name2
UserProfileController.php(f
	file_type2
.php(g
�Ktext�K2�K
�K<?php

namespace App\Http\Controllers;

use App\Models\UserReference;
use App\Models\OrderReview;
use App\Models\UserReview;
use App\Models\UserReviewPending;
use App\Rules\FileSizeAvatar;
use App\Rules\FileSizeVideo;
use Illuminate\Http\Request;
use App\Models\UserSetcardVideo;
use App\Models\WalletPayouts;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\File;
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver as Gd;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Notification;
use App\Notifications\Creator\ReviewInvitation;
use App\Services\WalletService;

class UserProfileController extends Controller
{
    protected $walletService;

    public function __construct()
    {
        $this->walletService = new WalletService();
    }

    public function setcard(Request $request)
    {
        return view('profile.setcard', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function video_upload(Request $request)
    {

        $validator = Validator::make($request->all(), [
            'profileVideo' => ['required', 'mimes:mp4,mov', new FileSizeVideo()],
        ]);
    
        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }
    
        $user = Auth::user();
        $profileVideo = $request->file('profileVideo');

        if (isset($user->creatorDetails)) {
            $creatorDetails = $user->creatorDetails;
            if ($creatorDetails->setcardvideo != '' && Storage::disk(self::profilePhotoDisk())->exists($creatorDetails->setcardvideo)) {
                Storage::disk(self::profilePhotoDisk())->delete($creatorDetails->setcardvideo);
            }
        }
        
        UserSetcardVideo::updateOrCreate(
            ['user_id' => $user->id],
            [
                'setcardvideo' => $profileVideo->store(config('app_custom.folders.setcardvideo'), self::profilePhotoDisk()),
                'converted' => false,
            ]
        );

        if ($user->data) {
            $user->data->checked = false;
            $user->data->save();
        }
            
        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.videosuccess')
        ]);
    }
    
    public function video__reference__upload(Request $request)
    {

        $validator = Validator::make($request->all(), [
            'referenceVideo' => ['required', 'mimes:mp4,mov', new FileSizeVideo()],
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }

        $user = Auth::user();
        $referenceVideo = $request->file('referenceVideo');
        UserReference::updateOrCreate(
            ['user_id' => $user->id, 'video' => $referenceVideo->store(config('app_custom.folders.referencevideo'), self::profilePhotoDisk())]
        );
        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.videosuccess')
        ]);
    }

    public function avatar_upload(Request $request)
    {

        $validator = Validator::make($request->all(), [
            'avatar' => ['required', 'image', 'mimes:jpeg,png,jpg', new FileSizeAvatar()],
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => true,
                'icon' => 'warning',
                'message' => $validator->errors()->first()
            ]);
        }

        $user = Auth::user();
        if ($user->profile_photo_path != '' && Storage::disk(self::profilePhotoDisk())->exists($user->profile_photo_path)) {
            Storage::disk(self::profilePhotoDisk())->delete($user->profile_photo_path);
        }

        $manager = new ImageManager(new Gd());
        $imageFile = $request->file('avatar');
        $extension = $imageFile->getClientOriginalExtension();
        $randomstring = Str::random(25);
        $filename = time() . '_' . $randomstring . '.' . $extension;
        $image = $manager->read($imageFile);
        $destinationPath = storage_path('app/' .config('app_custom.folders.temp_avatar'));
        if (!file_exists($destinationPath)) {
            mkdir($destinationPath, 0777, true);
        }
        $newWidth = config('app_custom.filewidth.avatar');
        $newHeight = intval(($image->height() / $image->width()) * $newWidth);

        $image->resize($newWidth, $newHeight)->save($destinationPath . '/' . $filename);
        $imagepath = $destinationPath . '/' . $filename;
        $filename = config('app_custom.folders.avatar') . '/' . $filename;
        $dd = Storage::disk(self::profilePhotoDisk())->put($filename, File::get($imagepath));
        Auth::user()->update(['profile_photo_path' => $filename]);
        File::delete($imagepath);
        return response()->json([
            'success' => true,
            'icon' => 'success',
            'message' => __('profile.setcard.avatarsuccess'),
        ]);
    }

    protected function profilePhotoDisk()
    {
        return 's3';
    }

    public function contact(Request $request)
    {
        return view('profile.contact', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function socialmedia(Request $request)
    {
        return view('profile.social-media', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function payout(Request $request)
    {
        return view('profile.payout', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function settings(Request $request)
    {
        return view('profile.settings', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function reviews(Request $request)
    {
        $orderReviews = OrderReview::where('user_id', Auth::id())
            ->select('created_at', 'order_id', 'review', 'rating', 'status', 'published_at')
            ->selectRaw('NULL as from_name');
    
        $extReviews = UserReview::where('user_id', Auth::id())
            ->select('created_at', 'from_name', 'review', 'rating', 'status', 'published_at')
            ->selectRaw('NULL as order_id');
        
        $reviews = $orderReviews->union($extReviews)->orderBy('created_at', 'desc')->get();

        return view('dashboard.creator.reviews', [
            'request' => $request,
            'user' => $request->user(),
            'reviews' => $reviews,
        ]);
    }

    public function reviews_invite(Request $request)
    {
        $emails = $request->only(['email1', 'email2', 'email3', 'email4', 'email5']);

        $success = false;
        $alreadyExists = false;

        foreach ($emails as $email) {
            if (!is_null($email)) {
                $existingInvitation = UserReviewPending::where('email', $email)->where('user_id', Auth::user()->id)->first();

                if (is_null($existingInvitation)) {
                    $token = Str::random(25);

                    $invitation = UserReviewPending::create([
                        'user_id' => Auth::user()->id,
                        'email' => $email,
                        'token' => $token,
                    ]);

                    Notification::route('mail', $invitation->email)
                        ->notify(new ReviewInvitation(Auth::user(), $token));

                    $success = true;
                } else {
                    $alreadyExists = true;
                }
            }
        }

        if ($success && $alreadyExists) {
            return redirect()->route('profile.reviews')->with('success', __('profile.reviews.half_success'));
        } elseif ($success) {
            return redirect()->route('profile.reviews')->with('success', __('profile.reviews.invitesuccess'));
        } else {
            return redirect()->route('profile.reviews')->with('error', __('profile.reviews.failed_already'));
        }
    }

    public function profile_preview()
    {
        return view('dashboard.creator.public_preview', [
            'user' => Auth::user(),
        ]);
    }

    public function references(Request $request)
    {
        return view('dashboard.creator.references', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function wallet(Request $request)
    {
        return view('dashboard.creator.wallet', [
            'request' => $request,
            'user' => $request->user(),
        ]);
    }

    public function wallet_payout()
    {
        $user = Auth::user();
        $payout = WalletPayouts::where('user_id', $user->id)->where('status', 'initiated')->first();

        if ($payout) {
            return redirect()->back()->with('error', __('dashboard.wallet.error_pending'));
        }

        if (!$user->wallet || $user->wallet->balance <= 0) {
            return redirect()->back()->with('error', __('dashboard.wallet.error_balance'));
        }

        $this->walletService->initiatedPayout($user);

        return redirect()->back()->with('success', __('dashboard.wallet.success'));
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�`�_rƼhͤ�L^��ۡ��ۯ4�w���Z=	A�<�H���ټ7��5�|�̼��;�d>�W�<�`1=.�����[=�@=
%�<��3<�nH��Eϼ��F޺�(���n;�<����<��mH�;)���]0�W�<��<R��<���<��,=^C���s�mH�;ۡ�<ɼO�=3Wd�&s';�d�<�K�<r;���.<!VF97tE=Ń���i������a�л��=�y�<���n[q==�Ǽc��w������Ws�ɮ=�֟<�
09x��<Tc<S����nH<(���I=)�i<���<�u5��.��ު<�u5���+=���Ӽ�����fk��%#<d�߼`��j�<`�g�
���F=�t&��D<��;
ϻ�*=�=
z��L?<���<�=ta�3W�<)��Bܻ�������A���%�]0<���<��;�bm=&e�����:[��^`��[<<�Y=_o����<=�Ǽ�l���;��'�8�x��E�;�1�d�=n[q��餼�@�<޹<��p<ٸ]��Y�ĭ�;�&�c����{<m���g�Ҽ�����Sf<A����M;vļ�y¼nMڼ�
^��J�<]mX��K=J��<{{�ut<�����5���"�Kl:��u�kK������!S����Lj�26ȼbn<�d�;X=��S�<����;d���S�=c��O�2=)��<�1i��&e��C�=ۯ�<ƨ���V�ƈ�<�y�<�9F=��<3�؉�<W*m��v�<JY5�`�K�Kl:=�9	<޹�<���<�_P�w��62���+ݼonv<@�ʳ�;��;=9k�!5�<�*�)}��&�;`H�Y-�&e=^�:]>��\L<=��=a�мL�V=3Wd=�^=l���Ձ�	��k+<c�=J�輾�1�<Ƥ��Q�S<O�<���KzQ���t:6@$=�b������&�<k5g���;Lj;k5g���9=[97=� ��n=�;�u;��m����l��<��
=��=<x��<?��;�%;�}�<s��<i�)<V�9�#�~��@�;B�(<�g[<":�<~�;�+�=A���{�;x�==픤<d��<u�.<*�n<�AQ�U�<�W=JY5<g�=ԛ|<��%<q(=E)�;l��P{�/΅����)��=�/-;U�<q(���L�<#[4=8�<m�
�o#���<�@�:(��ڽ�<��!�H3+�����Ƽ<�B��y�<	 Լ�pG�����pRH<�
A�Z=Zc��]>%=j�.��}��&o���;3���<����k�;�ĸ9�F�<v�ʼ�F�~W<��<�ͼ9k=��&<'�H����<�@��d�ta�8X�JgL�ő���
�<&��<+�
�P��;
O�p6<"H/���<]>%� ������P�L��<��;�7����źO�2��¹<�`1=e�1��(@�R��<b|��
=5�@n� ;=�<�e�z�^�C2����ϻ
=�������v�;*���:]�=3(1�h-=Կ<\+��T�/��,�;�7
<V	Q<���=��<'���6@$=�"4��XT=m������<c���eܺO���g����w;,t�@<����R��&�;�m*�Z&2��7�7S)�;�Լ��?<̴�_<��!=�x�<8X�<��9e<8G�l��@n�ɮ<f=�a!<��<��D���5<�=`�˺'��;����
=
%»�]�������������N<O��<�(@=+�W��{�<��N<�wü|�<0�<��<?�5=��<�0��>�������7=L���fk<��<��<y�<��=`H�="���e����ӈw;#,��"H�=�?�����<�[<��J���l�
���޼A���Z���4<�F<��/��J�<M��<IF�=�L��$`"�Bs�)�=�R��@�<�yB=�F��
3ټ��ۼ�V��}O�>��<���Aϣ<Z<9y��h-=��<|ř<�3:���;���=F��<��*�z��:@ӂ��jJ�	 T=q(��Q��<���~0�=�+���r�g��<������<���9������3Wd�����c <Y���_V<	��W?�]mؼ�9	�T�y��n�<>S����<�/-�y��<A��<#M�����;2,�������=�tT���;F^:���
z���]���/�E
!<(����,M;�#R<��;=#�~<i���J==�B=��l;�J��ۻ��u;��=��/�=�+���;a�9��5��S���.��5��o8��-���������7��e�<L�(��<��<�3:<��<	&���;E8<���<�m�<2����=.'~<�膻Ƥ��Iu㼾@3��y¼�B��v%���<�k+;S�*;ۓ�Y-;Ƥ��`w��;�T<���<q(=e���������B=�Ɖ�ʳ�<U���ٜ/;�(=X�;�4�<�
�����0�
��������<l����c <ta���D�<%R�W�<�#<�����ռ�.�;f<��I<���<��<Ƥ:8��;��3�I���s�)}��"�<>��3�<��;�I��_r�;$?���!=����P�;��t<��<��;<�&=�b�i�<�j<x�T<Bs����<��<�w=����x$<�
^<���d�v<n'=�rU<{�<�(���<Iu㼎���]>%<M�r���T<V	�9�ż�C<i���)!���
�=�+=�0K<��<�c <�9�_d���~޼��j<�^2�e�����H=ɮ<0<=�e�m,>�Uh��d;�*��V	Q=�yB���=:~!��B2��h=�̕�z�޼)��<}؞����7
�	<�����<����O�I<��V�����;��;	A�	<"�����W�sN�:�'�<�����6��[�>�c����v�J<DE�<�&A=�'_��ꔼo1,��,<�H>=r	��׽�o#���<Q��<�N��D�<I<��1='�_�����]>%��*��ğ�<k׀;.�<�u���R�;�ּW*�;�l�:N��<����<��M<Mq���쓼���;c�<7E<!'�e��<�Pɼ��<�}����fȶ��������;y�Y<� 5�����
��y�p�@n<Q��;b�U�0><��.k<�Ʒ�o?üȼ-�GO�<��%��?R���a��3�<V̆<L�<F޼on�<"H/<ț����z�x�!����<Ń�����m�;�)^���w<@�Q��g�<_�<e����A<q(�YPw<�Q�9n��c��<	��}�,�<Ɩ�<]>%=�ĸ��G���O;�vS<KL��.�<�<=����n�<�d�Dʼ�y<�4�� �<C���y�ɻX/�;9J��g���y�;�����b���<����i�;w����A���=��g���P�x�k<��<٭<�����t�<]0����;.�J<���YPw<����s����><bn��ۓ=���<^��<f���F^:�Q�<إX����X/[=�f��߹W�����8f.=P:��$�;���<�ڼ8G<�-.<�78�8�;v�J���<1#C��<�Ʒ���b=@�<�<ӈ�:7�s<��2���/=ta��%����nȼ)�<�=�(<<����B=7��tT���n<=�=h�
=�8V���<&�:P�7���Z<Mq���j�<n[q;��;Jg�<
/=��Z��}}��G92�<	㉼p�{<�Iܼ=ݦ�*��/�8<�xa�!'=s�W=7tE<�YD;_V�S���V��Y-��Ʒ;:���o`߼x�T��=z�+<��:�g[=��w;f�=^Q��5N�;�9t��?=q(�Ƿ?�1'=�8�<��<~�<��}<�q��c =5}n<?�̼�7��0��Ѣ:-�=�㘼��a;��\���%=o1,��W<���<���<_�b��[����<t�\������h�:��9;��[��<wy��_d/�!�<���J*���b��R�����;�F?�4I�<��:��<��4�2<�̕<�<�{<mHl=ț���~�����;DE}����<s��:":=ŲѼw�O;�5�;h�W<c�'��e�<���@�<���9on��>�0��&o�+�W=Ĺb�><k4��e��m�<C2����2���<���;(��<�%Q=���-�����;sN
�Iu�<�P=�L�;֐<�B�.'~9D�<�r��u��?����'=y��<ta�DʼZ&2�$`���u�/�<�K�;��f<�h���>���<E�=�ު<x�k<C$�B#�h��;���BE<9��;%�>�A�?=���;_���B�<�Z%=�<��<��;�a!=��;N�w������-ɗ<U�K�62�<E센�׽��J�)}�;
����Oh�,�:޹��G���c ��<�pG<}��w��<��[<�\3��d�&�ü�b0�
=5�/��(��<	 T���b����<��;��`��Y�<9�ʻ��H<y�p<�;=8f����<�&�=��¼��6=�̕<Zc|<�E��O��:��<Mq��X=r<���&o<�t&;����PI<��l�	㉻>�㺹�<a[��~�<mH��r�<�<���;����t}@�v�3�T�;g�=0�;@�Q<5=�2=>S���<��<�Ԡ��m*<�;�Z�;��[�8��<��<��<ƨ;B��,ĩ����f�6�����p��<ĭ㼻��<�,M;��=�ᙼd��<�z#���;o#����<�����=u�E=to)�(��#[4::~!���<.�3<��+=�3�;@��;��<�=JK��\ZӺ�q廎���e���䈼�x�;���<<��� ����T=�̕<*0���	��jx�V̆��Sf<b��<\	=B�(=��ż�#�<�,:�@a;�F<���D�;��B<���?��<l�:)�i��L�Bs;"H���Y����M<=��;m,�;�X��*��<&=Ɩ#<��$<~݌<7�s<��d���8��;��`<Y�<z�+<�"�+�׻�PI;��=�6W��!ӻb�ռ��ѻ�ҡ�A����,�D���'�����������c�'���Ӽ�#��#���U�<e����g=�;R�=Kzѻ�(<0�
���T<O�29O����S���<��ļ�����YD<�@��8��;@�:;9y���K;l��*��3�����'=*��<�i�<!'�9��;J��9J��rI�<�;y����z��4;6���<U�<A�<ő5��H�;	��5}�P{�<*����<nM�<5\R;���J*�����<��;��F<��)�@����ĭ㼰�n;9k����_<��==&�ü}ʇ<�|�<L�<ؗA=
�<�y�<�¹<k5g��<Jg�<�7���ɦ�񿜼�f�<�z�;��<_o��\�;�Kۼ��=�Ly;�j��+λ�Q���3:<�x$�
T�<=�^�!�<H3��;���$�<�r�;9����4X=�%;����(<x��<C$�<L��<�w���?�<��b���ϼ�y<0U;���{�����<�0K���J<d�,��l<�?<3Wd�ļɻ����\3=_�b<-׮���=_�<�� =�Ǻ���<��;�T=m:U���;k5�;��f<9y3�9��9o`_;���<���<�<�����ػ�;=�bm���l��ȼ�LK<����_d�<"H��0U=kK��)޻��\;�w<�W=�T�;��<X=�;.�ʼ�<���;��<sN�����;ڽK�5N;���	;�A=�u5�s\�<)��;��z<9J;c�q����; �;p
��+��5��?=YPw�/���M�[��59<Mc=��'<!'�<��I�Z4�<.�<c?<���<]mX<+�
=A���{A��3��.k<A��<����;����r;��ڎ��B�<ɼ��ụ�$��Z�<L�</x�뻝r=��1��h��yB�`�˼��<O�<�K-=����Y�<l��k4�kK�٭<��M;�i�<r	���,�9k�<��u;���to��[
<i��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045699
data:
<source.2,
*app/Http/Controllers/WebhookController.php(d
?	file_path.2,
*app/Http/Controllers/WebhookController.php(e
*	file_name2
WebhookController.php(f
	file_type2
.php(g
�Ltext�L2�L
�L<?php

namespace App\Http\Controllers;

use App\Models\EmailStatus;
use App\Models\Order;
use App\Models\OrderCobranca;
use App\Models\Webhook;
use Illuminate\Http\Request;
use App\Models\Transaction;
use App\Models\UserData;
use Carbon\Carbon;
use App\Models\CrispSession;
use App\Models\CrispMessage;
use App\Services\CrispService;

class WebhookController extends Controller
{
    public function asaas_cobranca(Request $request)
    {
        $data = $request->all();

        Webhook::create([
            'source' => 'asaas.com',
            'webhook' => json_encode($data),
        ]);

        $event = $data['event'];
        $payment = $data['payment'];

        $user = UserData::where('asaas_id', $payment['customer'])->first();

        if ($user) {
            Transaction::create([
                'user_id' => $user->user_id,
                'provider' => 'asaas.com',
                'event' => $data['event'],
                'provider_id' => $payment['id'],
                'customer_id' => $payment['customer'],
                'value' => $payment['value'] ?? null,
                'netto_value' => $payment['netValue'] ?? null,
                'description' => $payment['description'] ?? null,
                'type' => $payment['billingType'] ?? null,
                'status' => $payment['status'] ?? null,
                'invoice_number' => $payment['invoiceNumber'] ?? null,
                'deleted' => $payment['deleted'] ?? null,
                'anticipated' => $payment['anticipated'] ?? null,
                'anticipable' => $payment['anticipable'] ?? null,
                'provider_number' => $payment['nossoNumero'] ?? null,
                'invoice_url' => $payment['invoiceUrl'] ?? null,
                'transaction_receipt_url' => $payment['transactionReceiptUrl'] ?? null,
                'bank_slip_url' => $payment['bankSlipUrl'] ?? null,
                'created' => isset($payment['dateCreated']) ? Carbon::parse($payment['dateCreated']) : null,
                'confirmed' => isset($payment['confirmedDate']) ? Carbon::parse($payment['confirmedDate']) : null,
                'due' => isset($payment['dueDate']) ? Carbon::parse($payment['dueDate']) : null,
                'payment' => isset($payment['paymentDate']) ? Carbon::parse($payment['paymentDate']) : null,
                'credit' => isset($payment['creditDate']) ? Carbon::parse($payment['creditDate']) : null,
                'last_nvoice_viewed' => isset($payment['lastInvoiceViewedDate']) ? Carbon::parse($payment['lastInvoiceViewedDate']) : null,
                'last_bank_slip_viewed' => isset($payment['lastBankSlipViewedDate']) ? Carbon::parse($payment['lastBankSlipViewedDate']) : null,
            ]);
            
            if ($event == 'PAYMENT_RECEIVED') {
                $status = 'RECEIVED';
                $orderstatus = 'AGUARDANDO BRIEFING';
            } elseif ($event == 'PAYMENT_OVERDUE') {
                $status = 'OVERDUE';
                $orderstatus = 'AGUARDANDO PAGAMENTO';
            } elseif ($event == 'PAYMENT_CONFIRMED') {
                $status = 'CONFIRMED';
                $orderstatus = 'AGUARDANDO BRIEFING';
            } elseif ($event == 'PAYMENT_REFUNDED') {
                $status = 'REFUNDED';
                $orderstatus = 'CANCELADO';
            } elseif ($event == 'PAYMENT_DELETED') {
                $status = 'DELETED';
                $orderstatus = 'CANCELADO';
            } elseif ($event == 'PAYMENT_CHARGEBACK_REQUESTED' || $event == 'PAYMENT_CHARGEBACK_DISPUTE' || $event == 'PAYMENT_AWAITING_CHARGEBACK_REVERSAL') {
                $status = 'CHARGEBACK';
                $orderstatus = 'CANCELADO';
            }

            if (isset($status)) {
                $order_cobranca = OrderCobranca::where('cobranca_id', $payment['id'])->first();

                if ($order_cobranca) {
                    $order_cobranca->update(['status' => $status]);
                    if ($orderstatus) {
                        Order::where('id', $order_cobranca->order_id)
                                ->where(function ($query) use ($orderstatus) {
                                    if ($orderstatus === "AGUARDANDO BRIEFING") {
                                        $query->where('status', 'AGUARDANDO PAGAMENTO');
                                    }
                                })
                                ->update(['status' => $orderstatus]);
                    }
                
                    return response()->json(['message' => 'Cobranca successfully updated']);
                }
            } else {
                return response()->json(['message' => 'Webhook received successfully']);
            }
        } else {
            return response()->json(['message' => 'User not found']);
        }
    }

    public function smtp2go_webhook(Request $request)
    {
        $data = $request->all();
        
        Webhook::create([
            'source' => 'smtp2go.com',
            'webhook' => json_encode($data),
        ]);

        if ($data['event'] == 'processed') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                if (!in_array($emailSend->status, ['delivered', 'open', 'click', 'reject', 'bounce', 'spam'])) {
                    $emailSend->status = $data['event'];
                }
                $emailSend->processed_at = Carbon::parse($data['time']);
                $emailSend->processed_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'delivered') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                if (!in_array($emailSend->status, ['open', 'click', 'reject', 'bounce', 'spam'])) {
                    $emailSend->status = $data['event'];
                }
                $emailSend->delivered_at = Carbon::parse($data['time']);
                $emailSend->delivered_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'open') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                if (!in_array($emailSend->status, ['click', 'spam'])) {
                    $emailSend->status = $data['event'];
                }
                $emailSend->status = $data['event'];
                $emailSend->opened_at = Carbon::parse($data['time']);
                $emailSend->opened_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'click') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                $emailSend->status = $data['event'];
                $emailSend->clicked_at = Carbon::parse($data['time']);
                $emailSend->clicked_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'reject') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                $emailSend->status = $data['event'];
                $emailSend->rejected_at = Carbon::parse($data['time']);
                $emailSend->rejected_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'bounce') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                $emailSend->status = $data['event'];
                $emailSend->bounced_at = Carbon::parse($data['time']);
                $emailSend->bounced_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'spam') {
            $emailSend = EmailStatus::where('email_id', $data['email_id'])->first();
            if ($emailSend) {
                $emailSend->status = $data['event'];
                $emailSend->spamed_at = Carbon::parse($data['time']);
                $emailSend->spamed_at_array = $data;
                $emailSend->save();
            }
        } elseif ($data['event'] == 'unsubscribe') {
            // 
        }
    }

    public function crisp_webhook(Request $request)
    {
        $receivedData = $request->all();

        $data = Webhook::create([
            'source' => 'crisp.chat',
            'webhook' => json_encode($receivedData),
        ]);

        $webhook = json_decode($data->webhook, true);
        $event = $webhook['event'] ?? null;
        $sessionId = $webhook['data']['session_id'] ?? null;
        $peopleId = $webhook['data']['people_id'] ?? null;

        // Instantiate the CrispService
        $crispService = app(CrispService::class);
            
        if (isset($event)) {
            // If session_id and people_id exist, create or update $crispSession
            if (isset($sessionId)) {
                $crispService->getSpecificConversationData($sessionId);
            }

            if (isset($peopleId)) {
                $crispService->processPersonProfile($peopleId);
                $crispService->getPersonData($peopleId);
            }

            // Message event
            if (isset($webhook['data']['content']) && !is_array($webhook['data']['content'])) {
                $crispService->processMessageData($webhook['data']);
            }
        }

        $data->processed = true;
        $data->save();
    }

    public function github_webhook(Request $request)
    {
        $data = json_decode($request->getContent(), true);
        
        Webhook::create([
            'source' => 'github.com',
            'webhook' => json_encode($data),
        ]);
    
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0r�c�����h+=�ô��ɮ<J7e���߼>r<�ٹ<�s/�/�O<��üfZ�W�\��X$�<����;=�k;/�(=Y�=��<�i���y�V�H��D�;h￼m���F<����bN;.����� y��ܼ��b=���I"=tk�;w܄=��Ȼ��f�ۻf��<������<2���5��ra��<v�&��<D���3�����:�庢:���>�;<<o��EV�;��<�Á�l�<v��~�ļ�攼�b>��}��Bt��=��<b�=jwE<Q@��g�<�)X�W�$=��<G�5�"�:������䖽�����%�|8�j.���ȼ['�;a���,��c$=�x]�"�=��<�)�P���EV�:�A)<a�o;Ŷ?=6�A�P���1����<[����2<�<`�V.���ռ蓽X��9_����<���<�@��(bX=�������{A�@Ph�i��:�H�<�r|��.<�I:�ռ���<�9�;�v�;���<�a?<R�=������E�ׄ9=�v�:{��<�s/�E�<��=X��h+=�J�;\A\�G�:@P�@P��=��9���E�����;���0�Ҽ2
غf��< �<PW{=�J������L���|�<z5�����Q�3L��o�;_�=.9J�Z��<��缸v����J�	5=Q@�<��P�(�<�1�aT�<g��4�<���<<����;�m�P��ѼM�˼W�$=U��'�|<w�<���<��<z�=��"=����h9<��;Ȋ�;���<,������~��<\�7;-,#�y�U<P|�/��<�v�;��<��5=����2<b�=9��>���bμc�P��3�<�Cڻ�Yy���=��'��B��c��;T�@=E�-=R��L������O=�:y��<��������<����<��"�2�3<lm��lm�������M��<c%u<�'�;�<'�|��p�p��<Ӱ+=lm����=���<�do�W�
ܷ��-;;��=�;�c$=OJT���L�#l=��L=��üz��<^���x�;��N=���ʀ
=Z�V=4�=s������<nK�<���;���;�tz��*;�˓���<�f�<���:��<~� <\�=��B=�ԼZ�/�o�X<AC��
A���A=�90��7���p;�=�d�;%ͫ<R=��_���������Պ�}��<�7�/��<����?D��`�<�����������:�$=pN7;�i<b�WS�<��<�*�z���'�U�lz)��iQ=���;���<���<Y��<#l<N�N=K��c�,=�0��u-<�5M���<rּ���*���̼M���������������8�I;gta<d���^��<�
��x]<����h<�Td�ǹ���$C=vnM�� -<�f���G��Kl=�?��\A\<��e<��(=�,��͑��ʔ<i���<�`@�0x+=��3<*�������.��u�=�In=�\��O�=v�ʼ�/�;�X���^�<t٠<�A��D�*=��<n���$C<n�
�E��<�t.��Q4=y(����Z=H�8��vx<>�K:��Ш�˚X:N���d#<#�#;/
t������<C��;�B���b>=I�;��;���=@ݼI*�<aG�<�M<�9c<�YF��n=4���:�_Z���'=��b'�2��<�d�Ŷ?�tȼ�׈����AD;��v�<@CA=w{�<�90�����-�1IU;C
(<��;=�i<��F<)�9�w2P�@P��ٹ�u�n��_�<w�;�N�>�)��<�63=va�<a��<<|��,	�/�L;��=���<���;�I�^��<���<g��<O�=Zc=������<r��<�{�1�=2
ؼ�����:X$���Q<J�@�%	)=<&�<:y�=E�x�˚ؼ4Y༯�==�{<��<���;����쨼aTK�B���2�3:�\�<�?D�|8���։���N��~%< �<=4�<x����3<�/9�n/=WS=<|�y�U<�A)< q�Q=
�»���<�=ƻ�L�������;ޱv;9�p���Y>�;��i;'U��0x��Fc׼��Z<g�޼r�c<ǹ�<*e<;�����''�l�0�	�b���ѧ��4N;�h���7<�غ<$���5�>�,ﻣ\�<A�<���pN7<t�<�	<�N=Ϊc<Y���aG���2��˓<gg:<��5=��Z<ؑ`�$�=Z�/<��V���|��Mѻ�ֻ�
=}Rf�&�.�{�����:�t.�DΪ��f���~����r��@P����<�s/��߁<��<��4;庢<�׈<p�<�b���\=�1�<m1�<���;4<:w�<�X.��=���b���мk�#�Y1ѸQ=K�j<s��;��9<�Z�<��3<��7������ɼC`�<S�=t"E�����[45=�$���*=3?�b��<³�<Ny���r�;���<O�钼��<ĩ=	aٻ���;�b%��2i��p��,<=&�һxd�<�Ҽ�)��*;B�m<�6�~��<	ϐ<gta<�[�;�;a�O�<��v<n4��5M<��d==.�����Ӽ�O����;RM8<�:��81<`꼍U=���<�B(=�VI��==�Ā<�ʭ<�m��\]=7�"=轆<���1�=�qʺOJԼ��=�5M=2{�fZ<��);+rc��[�&�R�W��<!��3=�1=�<����)�9;�1�BF%��2<Ny�<ɼ�<���lr�^��;�{A���λlz��"� ��Ш<��"<�<�<4<;��PW{<��=��T�!~?=~���"�<�,��;a�D��;u��=36<a�<'
�/
t�#�<:0�<1IU;�0��d��{�=V.����:�SȖ��غ�G'Z��V�;bN�B����5M<Y�<�r�����%B��7<^��<���B��=� �:�|�<�%л�R3<����xd
=�,����F�<��T�4�<�<�N����/=��8ه<�#<}��7i��oe���=��	<E�-�⼯����<�#=��<K�j�ʀ�<��<��;��4�<z��³[�����2�w{t�$�񺗮-<���?�b;B�"����D'<�z< q<lr<����f�$��;�;y�ռ[�}<yz�6O���j=k�#�k�#<��=[���?+�Ӱ�;��<w,��+�<h￼�?�lz)<ddV�2{�h�<�D�<j�:�
;Һn��V�;���;�)��Q�<���<Ml��\*�C
���,	;	a�;>r�;3?�;#�������&A;�3�;J�=z54��o�<�����s���J!�'�|;}Rf<EV0<j.!<bϩ���5����<>༢�=<|�Һn��R�� y;�\�<[���_�;
�¼^)�I<� ��.��<ʀ
��Ԥ<��Y=gt�;��<�����zB�|��<��<������=ؑ`�(4���J<�\������< �����>��j7����<�[���x=��μ7=��l;U�g��Td�^�==;��;�r|<��j��
��R�<�]=PW��4���ϻ�ԋ<���쑔<���<�"����u<X����'<'�|<Hf�<���[45;SȖ;��+=0�<�k=�H���j�D�*:�}r<��=���<���N�=��Y<��;�4λDϺ<o�<���,���:<c�,�A�Ƽ�9c�&H
<ɼ=�-Իۡk<�n=|���11���\�^�d�%ͫ��;`�����;1��B�ɼHY<�_��_A���J=WS�<:�;;��<��;Y�,�z\;lr<����C
���)%��
���c�;3L�<��O=��<�:�Q�;)�:Р����;M���_��;�j�<�=��μ	a�<���<�~<8R;Ƙ=�v���XG�%�+�
�<���<}@<����t"E�7 =�V�<�����x�<7i�<\Aܻ�72�!BB=�
��b�;�0k�b��i8�WS�<MG�}E�:ݤO�F
�����<9_(���4���<�[��3O=���lm�<����N�<B���� �<�M�<��λ�"޼�,���K=��p�@P�Q�9&�R<�ӌ<�9:RM8�fZ��;�0<��<����;������<��;Ν�����<ĩ<!�f�.�%=��U����;k�<T����5ͼ�T�@Ph���V<�Ӽd�aTK<�x��U=lz)��{A��I�<����(�<�-�<�6=���;;b�P��<���Ƽ�e	���;�e��,��Xۅ=w%)�7ik<`�;�೼���<�x]<.��;�=��V��ռ���<��V�<&��r��;x�.�;��;��,=g!<CSL���]�FcW<����.��;�x���5��<8R�<�XǼHf;�WS�<��;G'Z<l�tH��I����W<�[w<$Rͻ�ػ�ѧ��6�<}E����<O�<����RZ߼��u����H��<^D���r�<	aY�r�c��F�<O��<�����9���;<AD�X$�<��<�]\�1���n�=b����9|<C
�;f�7�3�ݼڇ���?D=r��;3L��@C��Ny���.��D�;4Ǘ<�K�4��k�ʼm�<�"��F��2ĳ��v��L:�<�s�����������;8R;z��<U��<+����<]�;N0���V�lr;�
��t.<}��$��<D��;�B�<%м��\:����p�4<�@*�u��)����3�<z�=ޱv;�Kl:x��9��><�?���<<|<l�:����<�����I�<N�N�,�����Lv�;C����Kl<��;!��<�8�;��<�����<��0���"�����5���:筼܊�;0x�<a
=��:z�<ڇ=,�軍U��˼��=m��;m1=0<����8<f��<��E����O�;_C;/��<d���ddV�vn͹;�T��N���R3<�#�;����ׄ�<EI��.�+)?<�+
�lz�<�����μ>_�9_���7~��d�<I��Y��>�;��L�y~X=����+rc<�U�<z\��?�kP;Hֻ�,	:+�;�����p�Ny�<�5��<o��-,#�V.m����;�ֻGp�:L-"��_Z�N��<�O6;/��<�<tk�<�2�:0<�:Һ��r�<�L����;�X��³[�6��\AܺB��:���A��</�̺AD�"���W`';ݤ�<7��}	B<Ml=rּ<�V<ߚ���ںw%���ռ9��b'��[+�n�;�x<��<�<��(<�Ժ�z�<u�Ǽ)��;+rc���L�W`'=��<��D<.�����<z�<�#��@�;��ܼ��A=r�c<G޵<�H<=K�j�)��<-uG=�n�2�<���<aTK;k�l=��B<�M���B=�(��>��}r<�Ā�PW�:K:�Ki��� �<T�<�L�<��<�᲼m>,</��:�?��Xۅ9�5M;U]C�����8K�n/���E<���� �<Ml�����<��f�11<�u={t��ݗ��X<��b<�ԋ<��/<e�4�m��Gp�<�;�;!�b�=�d#�w2�;�R�<$�q=9��;?�b�0x�����<�~<n��;M��;�r��n/;i��;�r�9o}
�ӣ�<=@]��,=}E�<n���9��lm�<�O�h�?:��V��XG;zB�<�@�<�f�%��<%	�<��;��Ŷ?��x�<���<<�׼ �<=Q�Y<��I��B�<Sb��m�<�B(�5�>;��7��~;��0=0<�;�h�;�~�ӣ��i��J7e<RZ_<r��;sQ=�+<�2i<�e�����<CSL�p�X$*<���<K�j<^�;��;�t�;n�;H���b�<$E&��Y�<���T�<O�Ѻ���<�B����żt٠<^�<K�C�z쏼��i<|��<�v�<m1���{<p�;���:���_A<��I�B�ɻ��;~�=
��;`��:{�9��3�<h�<^u;^����
��n<�{�;2ĳ<���<�do<��Y:��;�Z���|�<\�7<M��;�{�9e(ٺ�ܝ��e"�o�1���<��b<��J���X�����2�t"�:(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045700
data:
6source(2&
$app/Http/Middleware/Authenticate.php(d
9	file_path(2&
$app/Http/Middleware/Authenticate.php(e
%	file_name2
Authenticate.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;

class Authenticate extends Middleware
{
    /**
     * Get the path the user should be redirected to when they are not authenticated.
     */
    protected function redirectTo(Request $request): ?string
    {
        return $request->expectsJson() ? null : route('login');
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0'�����<�����:	���Y9�06����r<�=H��<k$�����	�E*=h�½b���w�=�2=[,<��*=���<�KQ=��`����<=
�X��:�Ƭ�����o�(<��|<Yt�9X��;nռ���<R�c=/�"=)��<7�<���<�τ� ����t;.8��`�;�����{<�L�*��<ż�<J�<�75<S���;J�n�=�j�+�L�q<oYb�2�Z=}�<����p��3��9����֋�<��y�K`ļK-�zq�<L�<�v���5��_;J��<����=C�<V�=�7<��	�#»�X><��`�d��6��k�# ��7���d��<�l
;�N��Ƭ=���<������n�˺�v	��S;�=�;��<�k_<|+��t7���M����<_=��3���6=���;7�o����K'��<P!�;�I����<h����<��H��S<.�\�<D�;b
�;�#�;�E�#B�R��)�j���b=06����������;���;�gʼ�j�:��=E��<�)������<��M<OdY�����v<컵���!�k]�<so=c�=.8;�'��=	��#��<.���t<�<�JV=B
T�h	�c��_G*�|���I��L[��~��{y#�[�j��=.�W���߼��F���t��;�
����;;<�;�p�<b�(�iMp=�7=V5�<��%��=@:����	�X��<��gY�J斻>��;��;�h=-��O�'�;<�����*=�>���*�l�<����E��{=��E��[���ݧ=�@����b�JXg<�<�[=�ܚ��	c=֝=[9Ի�J�<bU�=���A=N�+����_��<Օ.=�9+���<~u[<��%=nռ/��<=��H���6=����oYb�B
�<�=?��n�˼����������ߋ<��*;���>�)�꼍X�<�Ej<zqF�\�<�z�������=Z|=<�X���\��."<���)��<���D":�@�<~�<��=�9=��K�_G*�-8D�^=*m=3���8���/��lZ=����i.;�Q\=������"[4<l���^λ�;J�Yt�<����
�<��=;�0S=��;��d��ʼOd�;JXg����;�x�<# (;A�����:�.�=<�<teT�m"<���=������;�>;��=N���)��)��a��FTR=aM#<�@Z�O�B<����3�q=�Q����;�
��0ӼoY⼠��-�����;�
+���;p(:;�4����9��<����B,=��<ӗ�<��;��te�<�
^�]I���W��!�:Ʋ]��м��y� Kz��7�I�9�FTR��)$<�p�;�MG�q&3=��%=H�s��
<L��<�f��C�Ǽr�༩?_<nջJXg=<b�`���=��y�L����<���C�<�4�ɇ�T�4���:&&!=֋�<�G�<f�;7��<N\�;�Tv�X��<��˸�<�^x�;���<�֡;f�<�=@=��K<+�$=��w�P��<I�P�&i
=�`��o�(;%囼c�g��-��*m=8��<5s弚5����<�U=��;�����<���<C�<���K=�'��Y�;���w�;<��=�I��Sr��1,g<&�����=��<��H<r.�2��
3�<�{�:��*�9w�<$�>=T��<�c;��Q<�w����w�M�μk$����<@֏=�������
�a����;�Wû24ļ�ڼ��<'�v<%W�y8�<M�N���*=S9=��<H�\;4��#+�ܟ�<�^r<���<�F���1�<���Pl6=��<v2<�(v�%��nU�50�<	���
7�<�3 ���<�� =|�����Y������=M�&���<�)q�k]�;�V�<���<�?�<�����n�K��O+=������;�t���.��=�����?�<�k�<-��;�����:*��;� ����чX��?_�����g�����<��D�b
:=��1�C1<������<ܟ<<����E<��=���ϛ<�@�<���<{�=��;�<�MG=�!G=,塚+ u�����z�<��%�yii<�忼��=�po�_�Ҽ�FA��0Ӽ΋ ��(�<h����缊���ـ<��;�`�<teT�9���������<�͠��0��ot<�q;|��<&��<u��:�J<:
=}�ļY�I���=/�"=9�@��$=���<bU���L̻�
���������^û�bU�Ǻ����=�F��b����׮����z.];�[X<��H��^��lA�?�2<��V<��<���<�=Օ�<5B���7<[,�^��<���f+<�:O���<���v��<������<����>�U�P3�̓C=�0<���˾O���-�<�lZ;�Ķ�+��<�<d�ļ_�R�B��<AP���7���D���!=��%<��<4��9��)鰼� �OdY=�؅:���R����A����4�N��G�<��d�f�<	�J��H�����;^N<�J	�þ��7@6;\A1<��t<�＋�!<$ݾ<;�4<T���)�<��;�%������L��<C�G<9́<��=��T���
3I��9�<k]�<�/�;	/�;��h�B<U-b��~3<N��<N�=(o�B����>)�!��aM#=(딼� <�R���᪼w2%<�Y'��؅�	/4<�$a<{y��Y=�D�<9���-�h�_�һk��<�N0��N�<�r�;s�<}�<"˼�����K�7@6�컵�.�E<j���1�<
�a���ۼ�	�;W�-��#f�u"k�����<Ż]�^<V�<p�:t�<)�����7@����p�Pl�<ۗ_�����B��I)�<��Լ}�D=zG��X>88Ĥ<t󃽚+C��`�<�J<���;���<�������<=Ж<�J;��<�p"<�8��Lۼ�E<�ә�Y�I��W�<~���S9=AP��;&<x:��v2;�<Z�&<]I=-�<+�$=Yt�	�<yi�9��p;���lڼD=6{B=��ݻ�#f9��;2
�q&3��@<��ļ��8dA��=�;���OB��lZ<��:�(�ӻ�ܬ7��ѹ�j�-�����<^%�-����KQ<�غ=	�<��<�,��\A��~u[=q&3�jUͼ��<3��<oY⼉T�<Ib���	��t�;��ۼ�F�AP=<[����P��G�;>�U<�ѣ���`;�#��Z1w������,(Ҽ�{f<��so<>T���%=������8Ĥ��-�<��#=�I��]=���<24ļX��1�<����B��<�Ǖ�:W��T��'W�9wz�� =kd�j_��r���'����BX��\�=��n�G�;bc��WC��d�<%&��Ӽ,2�=Vx(=��`<j�<�^�;dS�;��<c��5�=so���߻eI�<K`D���A��ܚ�C�;�8���I���{�����;o��pV�%a-=`EF;4�μi��<�Y'=�Of�c�g<g���B,�z.]=S9��>�l�ͷ:9����s�<���<��<�%ܼp����;�Z�v*�:�ߋ<-s=��T<'��9�����k;�<��h=�򚼔t�&���~�:�k_=2��`O����<lᘻIb(���R<!SW�1,g=�=Q)M���<������]����<���>�U<C<>��<����*m��
޼��k��@
<�n,�FTҼ��:S�@��W��#�D=V?��h��<���/��I��<1w-=�������E=l$;2�<<DK��Pa<֝�<�.��!G��9=2��4=I��<J�-<��:��"=���#='g�<Z�&=bё;Bԫ;5se<ok�<�
�;L�<#c��75��o'�דJ�R��<>�U<�$�x����� K�<!���#�<���<���#����<�t�<������%���%�b
�<��i<�D�<����lA�w2����?<���;������;1,�;.��<���<06(=|�g���:�j@���w<-�<Jj�;DL��V������<L�q<5��<�	�<���<,(R<K���)���ܟ����y<�S����G<��N뼢�?����<�I����6<Y~�;��<9���l��S��;��K<�]��R1*=[�<�N�#c=��R���ּ+�;��,���B=֝�;<�<�9x<$��;�;J�=L(<��8DL�:�,��|��;����c5�k]�;�KѼ`��s]w�[9�<�	c=�p"<�N�:�䉻��.�N-=����낍���;um�����{y#<��<��t<�L�;H!�;C܈=,k;��ֳ<�F��P3���<�P<ZC=+ u�aݼ�M�:�'��gJ<v*ȼ���;����J=�AU�m"��������#��;�s�<E���X��<�Q��j@<�ż-<p��b���̼r��;�!�;������8<�D�<�Z���Q���;h;�<���=@��)�<�ْ<Up�;&i�<D��9�=��p��t7=�Ǖ<���<�J�eI[�X��<�KѼ#�a��,��j_��v�<ё��X����d��j����<<D�<�|a=Tz��@����!==�$��Qܼ<��k�<��0�O�=�)$<�Z<m��<��ֻZ1w�b��<1>=��p�+ u<""��N�<��ݼ֝�=t�;w�����=��0���`��#���h:�@����;W��)�=w��;���;\A��$(:���<,(�;7@��2r<�5��$=G��<0oк΋ ���8<�"��/<��<d��<٣����E^=dϭ<�u ;�`	���;{6:��{����Ƽ�-�N꫼�溻x�R��E:�����M�;�Z<��Իr��<7޻p(=�V�;v2����;<�\�=1��;(�Ӽq&��C��9�hŻ�`�<�|��X�2;�U�ݧ�g,�󌛼b�(;?�I<�s�<�9���<���<�&<����=�;=�c<Th�:Jj�����<��<1,�<�	=�O�<um1���	=�E<�;Z|�<��ټR��\ş<��	=��`�_˘�b�<��:��<��~� �<����d�<���;��6��zk�|+=z��<B�j�W=�<C܈�����˻赻��]�꽙<?R����_�S����S{��=S����ͼǺ���;;֋m�7<˾ϻ�po=�FA=���ۡ��JX�;�X���,�;�>d�W��n瑼�W�:�F�<���<|>���x̻þ�<�=����2�ڼ�����eI[���	=��D�j�6��
<06�<�A��>�<9wz<�<��S��
+�so� ���;E��<�.��|=˅��q�
�Ib(=��=@��<�@
=Sr/�-���FTҼ!n�����	<��=����P��p���wQ��μ֝�<��%=�x̻��u:+c�;�<�Zݼ���<�+�;��	=&_ɼ�ڼ���$�< ]�I���^û<���Q)ͼ�vV<��%=E*�h�=���v2<�;J<�0�0oл
f���j<Lۻ��;��=�t7��Ķ;a������<x��r�<�ɋ��
��W���O�<&_�< ��:L��9��9��;}��&�����M���i<�j��$��E^<mߴ�}m~���������w;u"k=lA<�I���X9A=kd<O���k<y�/;�Nk��<��#=�75=@֏������|<yi�%a-=���;l�W<��H=�Kѻ�C�<��=���<�Zݼ0��;���<:׻���<G���û�4�<<#=�/���<��O��_<{y��C��9�JV<ݧ=�Aպ1�=,k;�2������<�9;��]<Fi��75=�f���߼��<h	�1>=h=�<=�x�?�<'��;��:F���_ ���;�=���K����Լ�ސ����f=̓ü��<�ސ<2���-<^x��ݧ<:���x̼�t%�M%8�[,<���xL<0oP���p<ݧ�<΋��S�W��@
=��p�S�W9�ܚ�B����L̼D��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045701
data:
9source+2)
'app/Http/Middleware/CheckOnboarding.php(d
<	file_path+2)
'app/Http/Middleware/CheckOnboarding.php(e
(	file_name2
CheckOnboarding.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

class CheckOnboarding
{
    /**
     * Handle an incoming request.
     *
     * @param  \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response)  $next
     */
    public function handle(Request $request, Closure $next): Response
    {
        if (Auth::check() && Auth::user()->role == 'creator' && Route::currentRouteName() != 'onboarding' && Route::currentRouteName() != 'profile.setcard') {

            // Onboarding not finished
            if (Auth::user()->data->onboarding != 'done') {
                return redirect()->route('onboarding');
            }

            // Avatar missing
            if (Auth::user()->profile_photo_path == '') {
                return redirect()->route('profile.setcard')->with('error', __('dashboard.onboarding.missing_avatar'));
            }

            // Sercardvideo missing
            if (Route::currentRouteName() != 'dashboard' &&
                (!Auth::user()->creatorDetails || !Auth::user()->creatorDetails->setcardvideo || Auth::user()->creatorDetails->setcardvideo === null || Auth::user()->creatorDetails->setcardvideo === '')
            ) {
                return redirect()->route('profile.setcard')->with('error', __('dashboard.onboarding.missing_setcardvideo'));
            }

            // Interests are missing
            if (Auth::user()->data->interests == '') {
                return redirect()->route('profile.setcard')->with('error', __('dashboard.onboarding.missing_interests'));
            }

            // Language are missing
            if (Auth::user()->data->language == '') {
                return redirect()->route('profile.setcard')->with('error', __('dashboard.onboarding.missing_languages'));
            }
            
        }

        if (Auth::check() && Auth::user()->role == 'business' && Route::currentRouteName() != 'onboarding' && Route::currentRouteName() != 'profile.setcard') {

            // Onboarding not finished
            if (Auth::user()->data->onboarding != 'done') {
                return redirect()->route('onboarding');
            }

        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�)r��r�<���$c:<��'=�W|��(��F�<^�$=�^�<] |�5ꔽ�x��3=�w��Q����f�<��i="3,='�4=#>D=3{2<����}�<m��zPl�����2���<�޼y_2=�Ա�m�Y�<��?<�=&��<*q�<Z�<*[�8�~�]_м���<<�ͼt�)��!�;�ع�11�<qU��f�<�
:�)T<�?H�!=OGX��h(�A:�;Ol�;j�<�=���<�$��9+<n����Z�3��"�rFǼ��=��.=�D�<��<���;�qx��ǻ�D���W=��:q�;?>����4�NV�<-�U�d���AT�;�<Y��n�V<�s���ּ�1�<�MW=ý,���O<�F=漛;����x<O-�;�*G8�~�<�Oy�G|�<Ћ��?�;�Nʼ}�<#r����v����:�N��h�Z�U<�u&=ޘ=��ټ�t=@/`���<�Oy�Gb�<k�<������Y3�Uo	�7?�m�<X�%�|C�-�3<Ź~;���<Q�\���K��w=֙��z�(��7���<oż����<������K���(���<*�|<�[�0�Y<qz����5��D�����:TJ=�	����A=���<���g�?<����%<�9I� �'�\T8;�,�����٠u<��U���^j輤)�<�\<��ỿ�<�O����y�<�o���e=^��;���<�s@�l��z��Vz����(<3J;���s^��O<�������<��s@��h(<�(�!(=��M�e �ATV<찐�o�n;�5�<5ꔼ²�<��<�\��;3��

�<��8=�������<�Z�<�)6�k-�<����^����=0@<��ܼ��F=�1=�N,��(<�]L=g�=An�;7?�ӻl����J�<��!�����<e��;��<@�;Xvs�GHK<8�~<K�E=��=��ͼdS�;�Ҽٺ�<��`<���������8�<$Iܼ`
�=����%T�����Q�=b=�5��<d�<�x�;��=)�d����<��<`�(��Q�<R���<=���<p�Z<p�Z;2<^<<ī<�N,��]���/=��;�s�����;���;����?>&�f=�Z���X<ҡ�:<u�<#r=��"����9>��j"�<���;jG����򼐛��TJ�;�<==	�
�3��<��<�G=t�<�v�<\T�<�1�<���i9�R�Ҽ���;=�9=^���s"�J��<tχ�l=G.m���<	np��������8%;�3�(���=~	;<b	�<��;��*L�i,<��ͼ*q
<�@<�ڼ`
=8�<|C=Z�3���4�t�˼a�@��~�;>3�<���<B�d�Q�����X�o!�	�
�������_=����(��<���<e�1;d����=l]j���弱j�jG:���I<Q�~=3��}�p�8�~=���U!�7��;Һ��_<�x�cH��~��Y�=;�=��<��;�%�b	Y=�O�<V=�<i,��K;Z��;��=4�	np����<�QA�n=,�<|��</��;�*G<�A.�1e�<S'���4�Z��<���;��:.�m��v7�Xϥ<��[=
'?<a�J�4=�\�h=�j���x<ӻ�Da<�[ȼsk��w�ϻK�ݼ�l�������<J��<��<oE=� ���Ѽ��<�B�<��}��+ؼ�̓<���<�s"�=�<3��u��<��e^ݼ����t\w=�;��b#��a���<�/;��b�Q�=]:�<.뇽U!o��*弳f`=�K�;��Z=�7�<�7E����)=���;�*�<��y��ȻKB<�kRR=�e�;9��=v�8iV�KB�o!=�ϻ��%��g�뀂���<OGؼ��}<
�=^j�=Y3��p�<�(�+W/=��;�7c=�R=��x��e1�#X��q+=7����a<:���i�;�����==�,<���B�<��<�u���Yb��h
�|��:VڼxT�~#=��Q=��׼-Ƒ���>�{��dSE;�^��'��;T;���<��ϻ�?��'P�y<�%�i1
=��=�8�<[$����=�Ȧ	�ӭ��KS���ۺ�(üF===�C�Y3:Q�~<�#����p��9��v�����A��׊<�(�<�"���Ѻ-Ƒ�ݍ�Ol�;5ж9�N9�"<$c:<=��
��5�<�+<�C�<J���w/$����<}��<�6�7�f:8d�<#�o;ʼ�9i�ͼ`β�Z�w��3ۼ|�ؼŹ~����<�j,��Ȉ<o��<S�j<�K�;ߚ�A���3[��;���9��6=V`�<X@�ݍ�="�W<h�y<���<,�=�|�;#X"�*L�<�(��8d�<FW<==�E;���<qU
��~:9�%��-=�PN<��|���A<��=�C���	=�,����;�=׾��_<:z?;�� ��O�2p�5�<���<�Ӡ��K���ú�5A�%�<]y.=�i�<`
����:�f��s���C�2�:G|�<�S'<�W�����;��&]<�������<�!�6=��a;��6��<�B=��&=%��J�<����t�<��$�\d=
ြn�<,�==�r��Xvs�A:�9%�;a��<�7c����<�F���Ӡ��F��0=��t<�<�D�%���닚�Įf�#r=��}�5�<n��9�N;-�<m���O�,���z<L�;�s���=W���f��>3=�d\�@�=��[*����;J��<��=	np��6R�u���L付��Q�=|�6�zPl<;�׼@���f�<��p��w*�����G|��F=���s^;P�"=g�<8��<�tQ�!=�-���t�l��B{�~�\�1��<mے��qx�w��<�O=�.�m��i9<�R4��{a�?>�<����=�ZU=A��5}<�G�7L2<�w�<[>�;�������W<��=N"b�ߚ<ҡh�׾=����ý,;�(C�>0����<�Oy;lw�<
�D<.�K=����E��jG:<���<��5�7��v��<�q�<�v������<�Cn����&�>��O��l<��<��>�?X<Z���C�8<�E6�?���؛;��;���P�D'=��c�W�/�NV�;��<��
<5ж;>0�f�S�L2=GH˼#>ļE�h�u�A=l]�f<�7c<[$��x:�<��!;%����y:ɗ�<Y�_��r��@c�;r`%��{a��%j�@/�<?$ȼؕ]<��S%�;��U!o:�񤼧��<��e�����^���;@c<5��E�h<�=��A�?X��c�<)�仉����<��]�9o'�B��<<��)
�<
��޽��5#���g���3<|٬���=���`
���t3<���\Y<8d�<4�@�K�]=��;JO��Q�<�|T8���8��I9�M���O[=jf�Ի�<p���:�L�ӻ*L�;����%�.��;X�%����;%Tt:Wk[<11�<'������7=+=ѻ�9I���
��LF��L�<���<˭�:}�p���;{��@�<����3Gv<���Uo	;�7�ѻF<���;b	Y=���<��r<��[>=���?>&=-���] ����/�� ���D�<����FW��ؕ�:P��~	���!�<��	:�$=�<�)�9���7E;פ#�P�D<cq����<�ϼ�XQ<���<dm��5ж<���pI<�:9X�Q�v�ټ���;#X��o�B���M<h�5���<@�=���D'�:��	=�J~��O��)=��=G.m�f�I�x��:��<]_P�|�X<��C=�ּ5��<Y��9��<�O��D�.=Z����<�2h<�%�<���;B�d<n���[�<��<$c:=$}��V`C���8�gͿ�A�=+=�<�ֵ;�������>�s;�)T����;��g=֙��Ź��Х=�Yb��1�9��ļi<"<	�
��؛�
��<cq<����"�!(�;a�@��C2�3�����}��� =���<���<K����]:ڼ߉�<��<��;e�1����Gb�<yy��=�9=��X;��=\I <QИ��%j;���i�<��<o�:Y�߻�[����] |<w
.���4=��U<3�(�N{�;p����<���>��;��	=���;WͼJ�O<�#������<MK���)=ѻF��=�B=�qZ��F��;�=[$*<v$��d����̮<`萼)�p0��};R�0���̼���<l]�<��5<^��
�ļ��;��<פ��"M�<��;!(�MJ<n�*<�em�>��;"6��~:<p9=���S%��	���z�#��;Xvs��6=I��yEԼ���iV��ℼL�����<�H;���<����9o���7c��������=�#���;�
�h�5<����m��Һ�ޘ���c�TJ:��Z�3<)��<F=3<����9��(��;�ֵ<{Δ;B��?>�<90S<��;��<��`:��<ӏ=��4�6=��j���C:i<"����^j�<"3,�`萼>�Q;�Q;^��:�F���O�;�]�<���~�;�Q=���<*q
=߉һW�/=�`�<g��<�N�%������<�u��W�=a��<�^;`��<O�
;Y�_:�<Ư;���a��<ja��8J1;NV��}6=�[��g��Q�<�����:H�Pŀ��k���w<{P�-��<��cq<C��;�z�Q�=zPl<J�q����<Z��9�7'=Q�����<� "��-���-��s�;o!=D'=f��l]깴�4���<L2<n�;�J������-�}�p����<MJ<L&���D���[<Z���An4��$<@c�����E2�<c.ϻE2=sQ߻��[�옻-��;�`==v���߉R��i<�B�*�|:ǁ��sQ߻�-�D�.;�MK���X�;<��;�Q��3G����A<k-\<���<��c�	n�<���<��>����:G.m�����6p<��<��|�OG�<e��;��<�Da<�f»;���B{;�tQ;��4=&��<w/$�����^jh��em���4��M�s�3�8d��+bǼ9o�<�2�:�iW��B!�:;�<[$�<��ѻ ��7#<��4<���e����<'�V�R��/�A�W��.��<��A;�d��Z�3<��;���kl0�
�";�Y&=]�=7�;�U;/�<�,���Ѽ�)�95<[$���߼�W�<v��<=<�CP�OlN<�P0=���4Ş�������g�a�o��<>��9[$��i�M�漛<�k<��W<+|%�R��<p���x�6���] ��&Ҝ<�g�;��ؼ��	=.�=�{�=sQ�<c�<�8="N<#r�qU��\n�<p9<��o��,-<@��<>�s�|���Y��������<X�Q=>��:�x���B?;��,H�?$H<�����,<@����������<��%=��;&Ҝ<�j,<o�B��<Y�_<�~v<{�=�i9���H<�޻MK<����
<�
�6;
'?��,=��d;%��=�C9��<������\���;<~#�9o�<�40<����+�;���8�<�����em�W�
�o!<=��ex;�'�`:�-�����<�;���x:��X<�N,=`�(<�R�1K�����<Wk�;Z�w�d���
�;�͡���`;��!<)�d=د��Ѱ.<�Da;K:d�=Uo	��[H�}�p<���0P<1�񻒱�<�`��f�٠�;���ɻ8%;<�C�j"ĸz�=�ع<Y��5#���cH-=~�ܻS<�1��5�X=���B�B�߉�<��9ý,<�Xѻ��<	�λAn4=Z�3��1u<C��;�:�<t��<n	=���Ȧ�<�s<OG�<IxY;?>&;2W�Ћ8�)�d<!(�������;�$��O��@/�<t�K��qx���e<�qx�-Ƒ<�����!=9����鼬��<O-��z]<�"���}:�Ǽ�I<.�)<�ԓ��f�;���<޽��Z7����l���=�����(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045702
data:
Bsource422
0app/Http/Middleware/CheckOrderCobrancaStatus.php(d
E	file_path422
0app/Http/Middleware/CheckOrderCobrancaStatus.php(e
1	file_name 2
CheckOrderCobrancaStatus.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use App\Models\Order;
use App\Models\OrderCobranca;

class CheckOrderCobrancaStatus
{
    public function handle($request, Closure $next)
    {
        $uuid = $request->route('uuid');
        $order = Order::where('uuid', $uuid)->first();

        $orderCobranca = OrderCobranca::where('order_id', $order->id)->first();

        if ($orderCobranca) {
            if ($orderCobranca->status === 'PENDING' || $orderCobranca->status === 'OVERDUE') {
                return redirect()->route('orders.payment', $uuid);
            } elseif ($orderCobranca->status === 'RECEIVED' || $orderCobranca->status === 'CONFIRMED') {
                return redirect()->route('orders.briefing', $uuid);
            } elseif ($orderCobranca->status === 'DELETED' || $orderCobranca->status === 'REFUNDED' || $orderCobranca->status === 'CHARGEBACK') {
                return redirect()->route('orders.view');
            }
        }

        return $next($request);
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0O3N��ۧ��H�g��<�;wi�ZI��ŭ��	=}�!�-��iHV�'���z=1���B�(<�M�<��8=���<C#�=�H=�g�;/}��0H�e'���0���o���j=酜�yB=0ː<fu��������;�h[=>��� b=���<�3=�8���O;#��;8�T����0H=R��9b�~�7�;+^<C�<���<��2�H���`'_�T3���!E�GJ=��<@�\�j���0���d�<kv�Wh��tü�G�Eq�<���<�u�<Kk1��=��<x���zX�<��;%ѣ=v7��V_�<�M�Fkh�Z����疼@��;*��<M�?�(ܠ��;�<�����!|��i<�l=a꣼#5�<c
�k����_�BJ:<�:�;�]'�ƾ_� �ڼ��=z�$�	>�Bf��ܲ9<߽����%�iٓ;��d��ż��*�C|A=�=��<0�:=	�����<f�@�@���T3�U����Z��iHV�=�_�Q�;R>�;_�<��{��<0�<��"=���4����r=符<�B�������<��2�+@��F�=e�{;[ԩ��4�;\���$�x�<�Y�<�ּ �Z����<y���:�ޭ<S�9=ԧs<�3)��
�%���>�3/���_�S��/ϼbO<�g2=����<O��c�<�7�:��ؑ;ZI�;H�v=�l�[�)=��C<x�X<|M	<�Ļ����Bf��A�K<����:��"��}=u�[��:=�A�,V�<��>=� ����=�L(Ѽ�G��v���cj�ދ/<Z�"<��=����K�CZ�����F�:<�.=���<�(����Y�9Bf�T�꼻����m�;�L~<t�*��.&����<`_=
���:����=�+=,r6���
��D��m�b����t�s�9u��;,r6<�y-<��<X傼Ũ���:<<�<+�=fY�����<0�����<�~�o^P����<�)�;�c깗�=�����޼Q������<�ؚ;}�!=D�<�"��<>�μ;Q�=w1��B�=3/��F=�{�<�<f=Y��*=�� =���riͻp!=��2<ָ�<��H<�tC;b����=j�D=F�>���=N���T�<id,=1�A�?�~%��Ҽ";�<��<fY��B�f���s�<d�9=h��<[_¼%�#8��=64w<�g2�.�D<?[��zX=�7l��%F�x�<��Ҽ��
=�ӻ��>��� =Fk�r�^=����#�W=��w��
f<�ݼ�,��#)=+��<R��<�b�<��@���;�y�<>�����L�V�6;]T����8=`�<遼e���;���<e�j�.g�<�������90��ؑ��U��
n>�j��<
���4<'����+<���<�[:4a�����<j��;%*�<�bȼ���<ˆ|<�C�;�z���]���H<��oӷ�H��< �ڼ�ż������
��i�D?=au<=S�<�ZQ=OO������&=���=3/=�}�<[�S=#5�<|�u�k���dܻ��i=�"��y=(ܠ��0x=LD�<��d:|M	�;�<R��/}�;r�^=��8<�8�L���Ǒ�ؑ=/}3=L�8<�Fr<k�	=8�ԻlS�<b8�Y�<?='�:�W��e�j9q�=[�Ӽ#m���&��q��qS<��B<��<�M������;��'<H���"�z<?�<���Yp=W<��O�%����Z<����$;��=_.<S�9��ٌ��<����w;H����<��<��v7�<[�)��J3=\{�;C|A=x�X��M<���<;E=e�����=�:��:��H|�<�9� #=ќv<��:���<UI�<���;c2\==
6��疼�G&<w1j��Ǽ�W��$�=���<��>���
�<@�\����<��
;�5=�W{;�D������eN�&+=��)�u��<�Qo���L���H��㼯)��[��<k=�������<ʌ!=���<t���2�Ն���K%�[_¼r�
<����G�E=T3��NǼ�;>��i��'�;�.��W{<�qt<kv<;�Q�`'߻����<�����<�6=�\l<\�:�e����&�9E����W�	�ϼ@�|13=����N�<A�K��=�\u�<�<�U��3��ٌ��P���6=�u5<XD<��<+�G�=Jq;]8�<{��;ȳ�<��<��'<.�n���	=��ȼ���<"����)<�ͫ�n�<�s!���=��O<c�=5w׻�u5��'��t�*��迼�r��^I<=J�;�|��<�<B��<O����q�;�=F.-�_��/a�:��/;J�=�!�<L(�<�%�=�-�<W�<L(Q��T>��	�(Q��W�%<X��;��=,r6<�,=}�!<��<{�D<{�g�=
6=��o<�L�ˆ|�-��<]T���^=%������<���<����7l�<!�=�¼n������<�d���,���Z�c���û�<@U�;K =ób�����V���e�V�6�R1��K<QD=�c�8I9��:��s�<������R��qt�-�=n�;M���<�&/<���<��˼��0<�T���Fr=8)ü\{�<�[z�j�=Yjv=�"�e�{�{������L(�<7��1=�q=�fu���4��c�;m��f=�<L�<����\"�c�<ާ���.]:������<��5�!xI�+�=�!��c�<���!<V_�<�a�y�x��49=� ӼX�<�?��+P�0�<(��;;�Q=�n�����+�<u�[=;�'<��h=M��cj<l�:�n���$=zX=����� �Z<fu<��z�3)z<%�#;�y���A�<o�ἀ�
=e��;��=�(�<1�;i���r�#=�y4;&x��	<7=)K�;.�n����<7��e���ײ�<?��	 �<�f	=6ኼt�;au�:���;O3�:�F;<s��ڽm��z=��<�ρ�%=ˆ|�C|A=UIH����;�3���5�<�;�R��ST�;B�<��<ᖬ�%����a;TA�
�<����=p!=�7��Z-��)�;O3μ���v�{��zֻ��=0}�\1;7��<���:=��<�_���G�;&��:� S<t��Q(���;�,<��"�9E</}3��<c�<ˆ|�ns;ri�<�+��B�����wM@=^�&����<�� �@qļ��:�P�<
���F�:?=�"����<Q�;h���L��;F�>�`C�<��4�~�R;
n>�oz���M��];T���oY���::��9E�������<� Ӽh���{��<A�K�7��PI��R>K<+�;��+=���0$�<�!E<���$��</L�!	���N+����<�]<*(�O�_<�f������N��<����ާ�<�Y�<�X�<�,y=
�<�+P��#�R���Ҏ;V�<7�e��-�<�b��H`�;��;I���}c:�ۀ2�ǁ���r�<ӭ����<�#`��Z�<�)��%�<M�<	X����h��y�:�"~�<�OԼ�¼���<D�=d�J�Q(��,�N�����h��<e��;���<CZ;iٓ<�,y�&����ӻ��V=��0<��<�$��r�;���;(��<�n0���d�J�/̼D��<�9Z�����t^�<$�����;GJ=1�T3�<T�j�6ۼǘ<�ｼ�t��(�t����O�5=NG�:�<����>ļ��<���9t^��ZѻnH��&���a��䡩���|�;����<٧<= �ڼᲂ���<j��<��V���<�7=����[�1���bH;}G�;X�<�[=���:�=�
�<,��<I9*�5�-<����h����#�<�<G�<�F�<y=O�=/a�<L=�]޼�M�;R�2��M�{��<�#�<n,ɻ�z;���6[;S��Q��<�/=��Z�}Gd�ۀ2<������<lSӼ,�N���;��:�<ͫ��o�����+�<��E�-����Q�;�_����<=]��<M�?<�oټۜ�&����:�-�<��
;��<�G-��z�<�ZѼ�,<U�ټ@3=.K�<X�V��r��7�:>�$=p�<���ns��f�<n�<W�<�
Y�N�;�R�;���;1�<�Xm�`'߼�����=<�#`<��l�";�����<`C5�����<�3Ǽ�%
=���;�Q�(��<��c
<��=64�<����Z���;���(�����@��<�X�Ũ����?=Rψ;=Jq<�+<$�X�V;F�<W>���=.�n<� ���\l<�ؚ<����fu�7�;��V<L(�<~�A�\"�����8�T<�V��utʼf��<mL�E�%�h�<�(�H|�;ۀ2�N�<ǘ�e�{<��@�"���B<N���[��Xɬ�j��?<2�����<o^P����<�^�;�H��I��y�x�(Q���C<O3�<+�< b�����/�<w§;�},;���ȳ�<LD�<�Qo<�6�<L�b<1V):�)�=�eμ��<;źL�8<X�V;�&����<<ۮ;�~����:Lռ%��:��?�s�����<8��5����Ҿ<b��<_�=���>��<�f�<w§<����(�S�<9���mE=�W=��=c2�<��B���%�w<�f	=���H|�<�G-���<=�߼��<�M��r�4<U�Y<W�s~��"n�=��<�Y_��!E��.g=Z�"�p?<�R;�	:�[�<���<B��=�Ce:^j�<%�w<=s��H���9ڼL�b:�=EU�<�L�m�<.�D<B��<=�߹�M;�#���S���c�\1;|��<��;^�P�h2%�W�<�r��=���Q(����<k="<y��)��c
=��r<�����c�Wh<C`�<-�<�/O�R��]8�<Z��"n�#��:�f	;Ive�%�w�Q�+��C��w��Qo�˾�����(Q<��������FW<�<����ؼs,�<%�#��;ۜ�<�^<�f<ӑ�<�5��}�<�3G<`'�<|�u�oӷ�Ve����<쐙<O3N�(Q�Y
�$��:r��<g���E�%<i��I�<�z<�S<�l�H|
�_�p<�z�;�y��Т�ݒ�_-���2�����e<��C���Ѽ�*.���V�+\=�{���Q8�� �;�Ļ:�C<ǁ$�@Un< ��<�t�<$��:2�;��;3֍����l��#m�;H`�;
n>��r��v�<���<�Y(�cA�|13=��<��&��ʗ���伳f�9�=��<r�
��.&;��<s�;6[<&+�h�=Bf<�;���Ɵ���E��m�<qS;#5i��] =Ve�<0ː��G&=,�;��;�Q�<3�7�Q�m;���;Ũ.<Ze;Nv��L���~
)=�Ɵ<b8����$<Eq�����<qS��z�}Gd<`�F<M����@����0�����<ӑB�k="�D�H��Y_;?�+<�6<�@(<}Gd:b���utʻ9?t<&�<5�-=��;���L(�<o��d�9��>�;��:���<�мA4�<�ޭ<�<JU;�z�:=�<#�-<�eN<_�������<�;u<0}�r�
��+��֜�<s,<�7v;����|�u�����7�;+睻����<r�^<���;�x<V_y<�Y�<+\�'���Z-;=G�;#Q?�����<0��4�ҕ<�0x�/L=���1��<�eN;�^�<B=����;t^��ͻ��<�e�;�ͻu��;�2��id,<3�7;kv��Ǒ<cj��=J���<r޴<��<�@��,V�;N�=�fw�cj�����=c2�<u��Q�m�P�<<��;�p���<I�;��}�<����f;�>D���=H��<�%�<6����r޴<��
<1V)�m��;CZ��3�;=�=
�}<i��B�k�3��f	�0ː<�/a]�ƾ_<H`�<�}�<�ˉ�ns=�`<�Z���5��3<[��<n��<֜?��%{;����Q�;d6-���5�<�;)��<��H;iٓ��$�� �<(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045703
data:
8source*2(
&app/Http/Middleware/CheckUserAsaas.php(d
;	file_path*2(
&app/Http/Middleware/CheckUserAsaas.php(e
'	file_name2
CheckUserAsaas.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Auth;
use App\Models\UserData;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;

class CheckUserAsaas
{
    public function handle($request, Closure $next)
    {
        $user = Auth::user();
        $userData = $user->data;

        try {
            
            $client = new Client();

            if ($userData && $userData->asaas_id !== null) {
                $url = config('app_custom.asaas_url') . '/v3/customers/' . $userData->asaas_id;
                $method = 'PUT';
            } else {
                $url = config('app_custom.asaas_url') . '/v3/customers';
                $method = 'POST';
            }

            $response = $client->request($method, $url, [
                'body' => json_encode([
                    'name' => $user->firstname . ' ' . $user->lastname,
                    'cpfCnpj' => $user->data->cpf_cnpj_value,
                    'email' => $user->email,
                    'notificationDisabled' => true,
                    'company' => $user->data->company ?? null,
                    'address' => $user->data->street ?? null,
                    'addressNumber' => $user->data->number ?? null,
                    'complement' => $user->data->apto ?? null,
                    'postalCode' => $user->data->zip ?? null,
                    'mobilePhone' => $user->data->phone ?? null,
                ]),
                'headers' => [
                    'accept' => 'application/json',
                    'access_token' => config('app_custom.asaas_token'),
                    'content-type' => 'application/json',
                ],
            ]);

            $responseArray = json_decode($response->getBody(), true);
            if (isset($responseArray['id'])) {
                UserData::updateOrCreate(
                    ['user_id' => $user->id],
                    ['asaas_id' => $responseArray['id']]
                );
            }
        } catch (RequestException $e) {
            Log::error("RequestException: " . $e->getMessage());
            return back()->with('error', __('dashboard.orders.checkassas_failed'));
        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0
���q<�f&����<�+=��H��b-�d'
;��A=��ʼ�Ż��ýk6T��]=f���ۼB�=1��<�T+<��v<%jc<�3=�R���:	=�/��`������*Ŋ�e��<kJ�H#���m��4�ºE<�J�<��H=� <1cb=�8�<_G^��o>�`e�7S�=��<��6M�<���1�K=�S���T+�w9\�Y`8<�I<s$=`[�BZ���n�9T�c<��!<_)C=�E��_�Ԑa;��<�����g�vZ<�'�;��Y:�t=��;q��<j��=�<�S;�����!�=ja�<�m<H�I<�z�A��<g[�����"<�ɼ%���E��K�S���+r3=k6T=M+��<�M<��=�q�Y�N��7z;M���Iu=H�@�T�c=���dS�|�'�6�=��F��Cü
��<
2&����S&;�ӌ<��R�0��%B?=�p��p*=�g��e<0<�Q=䖽d'
���I�Ω;���%�B<
�����l�<��;e�2=������;%�U=wM�;{��p*�_=�<Y۳<=\�;�W�ӱ=�������	��Ԯ�<��ȻYB=k"B�<"<6��:��\�$<0z���]C=��(<<>F�w�����0��d��y4���{m<<��<MI���h�k'�N]0�T�Z<�_;p ���T+=Y.�e�M<��I�H-�<wCe���������$����S���D�<����4<��d�S�<�˭�_�<���`�⼎?l<�z8�7�ͻ�{^��L<��/=��H�%��q�<k�+�B�5<%VQ<��3���:+��'a<�	$==p�;��m����;���W<�1ȻH�ҼN=��u;��n�0��=T�u=�؉�e���0��<�L}=�^4�Bd1�H_i<�,���;i�ȍ�;M�+<6C��|i�<�x�<�.�����<��;:1�K<M9=�O�<=�n<ӻ�:�:+=Ng���<d;1mk<�=3=%�����=��v��+�μ&�~<�h��< +=1;>�W�<���<���<��?=�	�<���\�=�;0�=ec�;�>�_�=�B�<Bd�<�c����=�;Q=T�c<%$���!�<69�<�0��O�<0',=�o�7��K=��4��4�}@�<4=��?���q �N��ޙ<��9<k"B�e�)���]�0�����<0'�<M��N��*@��0�'=0��9_�=��P�6�?=vn�<d���<������<<�=���;t����<ȗb�*=��O�°�<69�k6T���'�<>F����+�<�`���L�;
���eY7<_r���y�<�"��A2�=1�T�1��٘1=�QE=N�=��XF��]��n����|7�<YL����<kT�H����<�+Z��F�<�
켟6�<*ٜ�015�Hi�<�؉�w/S�v�%=��p��m<�{��Ǝ�a�<��=�*�|�¼*�=<����T�*���?7<�����8��h���ML�
�<�<�_%=BZ(=�#�:�=�W�;p>$=H��<e�D:��Z<k@ݺ�w0���ϼΩ;�=z�<�X�g[=��y���Y=�
�`ey<����i�<��#�S2���=%�<�<0',�H����" =*�=���;��٢:=���wCe<M��º�<v/=_�H���}����;̻%�1�d1�<H�<�@=��1<C��&��M<ٶ̼0z�|й�������]<vd�<�W�;%�g<M�+�6C���Iu�p*����C<��@=�>�+�7<v�3<ӱ�NP<Y8�:��8���<�v;�z8�p��<������U=�Q=S2=�G=��<<4=<�w�=6�?=6�������%�1�Bn:<�ͻ��'=��h=&�<MS'=B�����v/=$�������*<d1�TN_�����_|<°�<<R�=��ټ��;�29�eʩ<귛��$�<e�M=�2[�TXh��xV��� =ec@����;q������/1��BR���1=0�6�$<��N�<|-�<Is�<w�鼥ט:6�<H�����$��	�<H����#=�U�:p4��[���%��_1�M?���TX�=��<�օ;¦3��&�<4�<�(�<���<�R=A����F)��_��
�e����Ƽk6�;<"�HU�<�7z;�_<�8�����ֻ٢���ڠ���<�=���=�=7��<�A�<e� �Se�S������HAN��<<_��<w/�:k6Լ߾�<�qU<�3=%8���%�����Tlz=�c�j�=1E�;eE����I<�G<�`[p�%��;A2�%�:����
��=�&�M�����<�b�<����v<�<�:p*��*�;�J��TN�<Ǹ�<��:Gl=��=���</�<0�ߴ��P�!<��R<�G=�
�;wCe=j拼�"�<�=˼��׼kJ�<�<dӼ_�<���<k�|����<���HAN=�-�<v��`��;qd<T�����ꭒ��%�<*T�<v�*<�
7��<��U�y4<�7=�"����R<%��;+h*�q\�<�K�����v�
<��9�Q��1EG�Ꙁ���<��#��-�S�-�f<�
?�H_鼤H�<���<���<%����!���F˼0�0=�+��߾=ӱ��"�<�Bt=�1�;0��
���vn�;�
=�3����<�·��嚼��,��==��I���<ߴ���ۑ�ju�0',�<}=+�E����F<=�e�I��|#;k^x�*^!<T�~��';���<I��H!�<�<�1H��F=M?�Ng���]<�"w��<G����%:Yj��1Yٻ��麎5c==�n������A�p4�;*�
=*T����6<Y�=����� ���籼���;��<��<�ּ��1mk�d��+Z;k�X<�E��)<YL&<�#F��N<��K;Ng��6a)<�q���<��h9v��BZ�;��A=_���&<=\�;�<v��<Y$�<w��kT�5�;��O<%������<|�¼$��=��<���;�_�A��<���w/S�Y`8=���j܂<�?�
�<+r3=B����鼓G<�7�M<+��<�;s:%B����.=��!�0z��Y�H���
��$�
<� ����:*^!�������9�<��;��@<����k�꼱�<�&;��_�;So�<pR�;��
=���������/=e�2�_(��+Z<�'a=�� <���<�:��%VQ;w��;H7E;��%�Tb�<Gl=*�
�H-�����8N���#��X��٘1=w/S��=<��&;`�}�dS�:���o�7�<񔸼��ȼ0z�;��ջBx�<�I�����<�xֻ���� >�Y`8<�ϻ�2�;G�=H�%��S~���<pH��k��<��[����7R�ߪ���==_�;p�=|U���L�[<�	���d��L�<�F���
=�=HU�<ٶL��e����<*^!<��
�ɵ�<Gl��Y$�;�<�Z�Ng9��!�;�]�;<���MI�<���<ȍٺ�0<Z�<���<%�:;1��|��A�;��8k@ݼ�C!���H�<�
�<�'a��>�<=f�;k���*�<�,�<wCe;1�};�O�<���ӧ=�t�<ju=�)x;A2�<g[�`��;�w0��=
��Y����3��,����Y<�t�;��;L=_�;��!�d'
<=�e�+h*<YtJ���e�=fj<�� 9����λT�Ѽ���<���;���;�<�<�Ǝ��%<S����N����:k�F<�T�����<HKW��%����Sy<6�=G=_���G<<+��<��)���j��<B��<����>�p�<�Q�;�S��M?;���<N�6�$<eY7�
�<emI��<
���w<��<��<_�;��<�&N<eY7<jk=+%=��<�o>�uݼw9\�?7=��A;�눼�-�x�<j�<�嚼p*��g�<�6�<}��%`�<Se��f�<��
(��_)C<� >��<
��<+�;˼�k��<��漂@��" <v�%��`�&�~;H�<eY7�Ǯ�w�׼��<��<��<���w��;|i�<%��;T�c<<�<�;s<�Ԑ<eY�;�[�;�E|�v�%<�o>��4r<��<k6ԻT��;0����TM���<��<���<�N;0���H�%B?<νͻ%�<�����������;�؉<YV/;k��<S�
��5�<v,<0�<�
=Ǹ�+r3���=WB<���Y8����@<�;j�;����}���@�w�༱�<|_G��5<d���m����<H_i<�-�:L:��<�QE��2�<��=�<�W<�5;���<�j=��,;U��0z�k�Ƽ1mk�6C�;�w=e�ļBP��5�:�U:�G����YB<BF���=�V��٬�:1��k���k�s�0���7ɼe�=�.���;0���bO<S�<M9<���1�};�눺}-<wM�<<4=�v,��L��$	��H������֧;������;Mę;Sy�<H�m�xe��օ=�i<_�5=������<|���q�̼G�=���<�$ټk�4<�D4���ܼ��>������V<q\?�|���j�=٘��
���ʇ���-=꣉��<�_�°���2[<��V�1��<S =e� =��<̋�����ۑ��]�:��0��7z<B�,�ȫ�<�_��
�<��;�����3�< ͼ&~u��N��������<�����6��X�<q׺<Bd�<[��&~u��)�<ߴ����:B˚<귛9�<pͱ���<�o>�͋ �BZ(�*T;�o;��=6��;�L}��)�<�<�<�Q�N콼M+��+;�;�;*ٜ;�N=|K�;��%<=�ܼ꣉<H��<���e�;<�/<�29�0�=��+�*ٜ<��w<�u�%tl��'a<�f=M�=�嚼��P<�
�<�]<��<�a�N�4�0���W�
����<�����;Tbq���G�Y�3<��-=k;�)!�|�=k'=S&���3=}�|����1�;���<��=j܂<�[,���4<:�S���P�;%LH:��w%J�w9\=%�g�H�.��i.������l<�Q�q�C��{��_�Y<�.�<i�_��<�A�;��/=��<�O:�����`<�9:<ºE�69�_r<��߻< ��6��<�ݼ�=Bd��H���+%��ۑ;�v��ռ�a<°<=k�<��.b<eY7<6���w/S��q�<�0������<>F<T��<�	�<�?(=T0ĺG��;v�3=�Ȼ�O��<"��b���8��[
=��;6�-��9���;1�9<��<�ļp��<�����	���7� �;a�<�Ԑ<H_黓3*=�C�<�uN�%V�<�~�;&~�;��\==��;�o��`[�<��<v/;T�H��H��ӧ<����
��01�<K<w/�<�M*=Y۳;����ʇ;�}�<�깼���<���<��<��o�k�:w9�:�S<��=v�3<���<�&p<Bn:�囹�����<ɵ�<ɵ}�_�<H��<��4�X�Ԯ���+Z�<��<�a�� >=�:+�2��-�P���Ⓖ�3�A2���X�;_|���<��;��f��[���-���p:T�Z���;�YB���&<�E���Z��a��5㻎�y��dĻ<s�;�JD=d�;��<��$�<Tl�;S2��輙���w9�<��)��@�<=\a��5�<�ȼ��<��d��&���B=�����w<k����T���2[;�?켼�<|-��G��1w�;�+�<�6<k��<�I1��O��
2��_G^��E<|����-q���=��G<�Fm:_G޼�x=��(�kJf<+���E�˼<%VQ����<B�̻�6�<��;6D��΀<��;��<Ο�<�Z���0�귛;���;͕��Ǯ;���eE���<;7�ͺw�׼dS<NP��xV��ŝ<�;��i���<َ�;�<6歼k@�;��;M��Y�Ż�<B��5c<HKW9�:�<6ļM΢;T�Q�|�Yj�;��<e�ͻӻ�;wC���������9(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045704
data:
7source)2'
%app/Http/Middleware/CheckUserRole.php(d
:	file_path)2'
%app/Http/Middleware/CheckUserRole.php(e
&	file_name2
CheckUserRole.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Auth;
use App\Models\UserAdminPermission;

class CheckUserRole
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @param  string  $role
     * @return mixed
     */
    public function handle(Request $request, Closure $next, ...$roles)
    {
        if (!Auth::check()) {
            return redirect('/login');
        }

        if (!in_array($request->user()->role, $roles)) {
            return redirect('/');
        }

        return $next($request);
    }

}
(h
pk

	����̷��(i
�0evector"�0��0
�0��ӼQ7=�ü��<�Nh=Qꤼ�V�Q��<PN8=�,�;�xݼ��o�O軤x]=�gf�����Q�=� {=P0�:Rj�=��<=�L�;�y�O��:OU���(;�g��&
=�XԺ�Q��P&=NW�����?�<��<�N�<���<��B=�F�<O�Ȼ�*��P�����;�qҺO�L�O��;P��Q��<�2����<���<P���NO<�6=�%����^<O�P�7;P4���S<���N{p���=�쇽P�(:Q�"��n(�����O=�<��*=��	<P�»�啼�#�;�&o<�4S��z�=�G�<��;Q����P0�<P����#\:��<��ٻ�k��Q�<�n��-�����<�e:=�d<��?$=�C庤ri��8�O��;���<Q`�<Q�<P޼��`�<Q��J';�X����H=���<��I�PP����f�Pé���%<�'�<��=��	���=�P����u=��/���<��M�O!I��@��P���Q��Q�$�P����;����1�<��<<Q�=P�B�Q=<��=P�6=O�Q���6��wF��m�<N�m;N/v��>�<PN8��K��OcW<��;<��Q;�v=Q��Qb��P�;��[��y<����l=�	�<�#ܼ��t��t��P�����s��MQ�����?�;PI�<��-��ꋺP�:����<QD=Pn����.��Z����|<����Q�=��<��;�v�O�ۼ�����<ý� 2<����O�߼P./���f=N��;��j=PO6��>���*��Q\����;P���p��O�Q���Ea<P&=�%��Q����<�)��nq�N���P��<Q�=��r�O=�<��ǻR�����<R!�������!<O�Z������<��[=�Z7��qR9PU*=O�Q=��Q<P����;�����b��QӉ�N1�Q��<��<��<�C5<O�ʼQ���P�*�O9�<N�r=�C��g6=�MѺ��=�$*=�һ��4�<�ʲ<Q��;�u�=��������!`�Q��<Q���Q���8=R ����;�"�<�8�<�x]<��̼�f=Qh�Q�=Qփ:������=N��<PI�<��?�O�d���=���<�l��8�<P�F<Q������<N1�<Q�;�=�]��OCN<O��<��6<��
��=q<Q���c�<�߈�O9�O�ʼ�� ��S�����<P��<��_<Q��:�%<Q��=� ����%<�6���ފ�����OCN���{<NYk<��*=�?���O����<O!I���}=�f�P*=����C��Qh�������Ll�R!�<��;�7�<��żNy�<���Q�<�����U=O7f;�h����=�$�<��t���9��z������qҼPz�;Pw���]1;��O�;�Ď�PW&��뉼��OiK=�k���k�<���<P4���;O�H=��׼�wƼ�쇼N�뼦�<O�S=��\�����E=R����l,����<P��N��8P����\�<���^H�P��<��9=��9<���<�q�<��C<��"=P��;N�y�O��<��3<�m��ʼ��<�V?=��P<�B=P�.;�\�=���<��<�]����<�,���\���=QЏ�Oe��1@����QA	<OQ=Q}#=Qg����=N}��!=�("<�te=��ȻN�y�Pn���m���ͼ�W�;P��;Q\�;PO�;Q��<OcW;�� <Q[�P./:P��<�Z�<��༥a¼Q�=��!=Q�<Q�;N����Ӽ�.߼�i��O�Q��1�=�P�Q�Ӡ���8�Pv�����<�ӹ�P
�<�g�<�����N����;�oV=OE�<��E=��'<�N�;�S�<��r=�Z<���Qf��~�P�@�O�]=P��<Q�=���O__<P���Po�<��
��٭�N�뼤V<O�L�P+5<R����U�<�d�=�-�N�m<Qэ�O�Y=��8�P�+=Q��<��,��]��Q���M=�	��P��;���P�;�Q����&�N��<N�u<O�;O�ǻ�F�<���<���<��*��,�����Q4�������:������=�l�O�S�O�O����<�]9O����<���:��<�ar<�>�<�I�:�<�߈�Q�"=��=��<��ȼO�ռ��0�P�ƻPU*�Ri��NY����<N�y�Ny�:��j;N�����߼�\3=����p���������:QӉ<�k�����Q���Q��PmC��h������<P��<���<�\��Q��;�C<�9�<��;Q�����<P�@=�`ļQ�;���<��Ի���<P�B����OiK��ƺ����Nu�Oe�<���QD����<NO�;�}���l�<�]�<�
�����;�K�<�ݥ<�&�<��<��1=NO�<�74��R<Q����$��P���=�����:=Q�;P/-=�R����=P./���׼Q�<Oh=���O�޻�H�<��=N��:Q�=��z�O�R<Q�<��C��Q<�?m<Q����ZP�O����NU�;��Z<�r ��Ea��*��'<�Ht=�Nh<Q��<O��9N�j��F;�>��:ǻO��<Pz�<��l:�0���������6���P�.���}<�ֳ<Q5����z<�M=P��<Q4��Nw�;���;�V�<�!��o�<Q �O=�<�#\=���O�]�P'=����;�=PN�;�q"9�G]���/<�ּPv1=�E�<O�W��D3���P�0�R��Q��:�4��Q��<�m*���廥������Qg����<Q���N���Q�=PP4<P�.����<P:<�W�<P�%�Pv�;O��;�P�<��~<�<����ܻ������<���Q�=�����!��V�Q�"��/D=�-H�����0[<Q�:��'�Q��Q�<���<Q�=�z���|�Q����]��ǈ<��q<��k�N
q:��0<PmC<N�<�i��UA�Qϑ<�9y���9�O7�;��<���<��=��
����<Q]���g�;Q�=OAһ�㙼QӉ�Q�
;�=�t���)=�Z�<��y=�ǈ;��ܹ�����h;��;NW�;��<�R<N}l=�Kռ�(k�P�.<P�F���`��,��7�<�U=P
(��7�;���<�	��y��Pⴼ�H��NU�<�ޣ:���;Q�<�1��wF<N+�;���O�˻P,3�Qɝ�QA	�Q�<�c���6��Q��;�9�;���<R��;�#�O�޻���<�h��P�¼�y���%=�N�PQ�����;�-H�O�b<�D3<�Y9��,<P診����w�;��;�u��Ht<�
����<O�P��~�<P��O��Pt�:P�0���ڻQ�=�*��N���P�4;����W�9�d#�O�O;��;<�6��	G���!=��A��^�<R�=�b��OgO�����ޣ���=����#���I�������;�2�N�k<�����:G����<Qэ��k�<�N�<��J��A�<���<��H;Oͼ�F��Q4#<�텼Qb���=���:�`ļ��h;Q�$��66�Q5!����9�7���i���ӹ<�S�;���;�〻N��<���<�c��׺���<�z�;�������O�H�N�~<PR�<�Z�<O�[<Q�<�Ц����<��ٺP��;P�)���:����P�,<OCN<���=�������<�
���=P*;Oe=�M��P�<�Q_�O�ڼP#�<�1�P2����<��r;��]�P�:<�f��k�<�p�<��"�OiK<O�P<�����<��<O=�;O��<P�F<PV�<P%��Q=��u����;P��;�/�;�����h;P�?��ݥ���T<��)���<N��<�ʲ���[<���<N�r9�F����<N5�;P����#ܼ��ռ�=;�C;O��;Q@=����P/-=�����o�<�p���!=��O��Ц;N�}<���<O��;��.�PP4���<Q�<���<��"�O��:�<�Q[�Q��<OQ;�9y;Q\������;R �N/�<��<O�ۼP%�;P�&;�t�Nu|�P	0����;���;�W�Q=�I�:O9b<N�y����<��^<P���O��;��u�R����X=���<Q����79P
.���<���<��?<��=;��9�Q
=Qꤼ��C=Q젼���<����ＧX=Q?
�Q͕<P�&<Nwx;PI�<Q9���=��G<��q�R��<OcW�Qd�<�)�<�P����D|�N�~<�QI=�j��ib��_�;�D|���RE<����+=�/<�n(�Qg=Q� �Q[��QӉ<��<����KջP��<�i�P�Ļ�wƹ�h�Q���3�;�<��=�
^=P2������r ;�e:<�����,<��PkG��b���&o<Qh���z<QD���9�<P�.=���:Q3%<����g����E<Q�<��=P�����缦�%;��x;Q`<�F��Q�<��r:��d<���O?ּ�ͬ�OռP«����<����}
=Ogϼ�V�Q� �P
�:Oaۻ�^H��G-��e!�QЏ�Pu3�P|%=�
<��<Q��Pt5<PV�:Q��<��<P�4;���<���;��#<�j�:�f�<Oa[=�!`;�*=�V����<P�;��5����<Q�<P�<��ȶ�O�R����:������ɼNS�<�|ռ�+�;��?=�("=�=(<�8���=��9<���<P�0������Jp�Nyt<�X=PG�<���<N
�<���伥�D<��<��5�P�D<�Ō��;�<���N�m=���;������<����H�:���Q��<PO��PU�;�t��]=�ߡ��.�<PK�������Ǹ<��0<��5�Q�=P�2��K=�X��P
�<�c%�Q�����ϼO�i;���<P�%=��ܺP��;Q`=��<���<�j:����������:P.�:���<Q�<�t����Q�
=����R ���t�:O�M<Q����k^<Q��.�<�6O��Q����~�Q�=Q�=�N�<P�B�Qힺ�oV=��<��)<P����6�<PW���!໥�R;��ڼ��	��(�<�ľ��i⼤
�9�C=�s�<���:�ֳ<Pm�;��Q�
=���;���O?�;PnA<���<��,=�9y��R�<�9;��u��[���Z�����P�<PV(=�n��5��2>�Q���4:�O=Z�OcW�O�i��ar;�s=���;Ny��PU*;�ib<�����:�P,�Qd�Q��Q�OeS�P%�<�sN���8�t�;�-����<��H<P.����;���;P�&;�m���!;��>=Q�=���OQ<��o<QZ���ؖ;����߈��Nh��ې<�^H;Q�=�u=�[~�P��<���=Q�����X:��)��l���:���5=�û�z���>?����O�ջN3�<P�(�Q�<�t��Z���o�Q���Q�<�;u�R ��C=�Ll<��~��r<�	�<�B�<�c�<�w���<�Z<��
��M����&���N<Q\<Q��ri�Q�"�O�ּ�^/=��=����uJ����;��;�y��O<��M�Q�<�ӼO�\6��E����;�=�+���U=���S�Oպ�ӹ<�ZP<�v�<�wF�P޼<Q<��<����<�<Q��<�(�;���N��<��ֻR�=�ƻ��;�����<�����ej�Oͼ��<Oe�<���PkG<Q��;O��<��м����O�ۼP2�9��ټ��};�1����f;�3�;���<�gf<�^/<��=���<��8���I<��]�PGƼQ3��O�S�O[���<�x]<P�C=Q8��O��<�*�<���;�t�<Q��Q�9P�F<���:O�W<�l��ȶ<�Pd�P%��PT,�Q�$���ԼP��;�l,�Q������<�)=�$�:�=q�P�:<��%=��;Q�:Q���KU=��)��q�����<R��;���<Pť<�c�<�C����!=N����<���<Q�<�
<��<Qփ�P
�:�+<O�R;�}�;�]1�����������=Q6��Q<��ې<�d���1;��?=�����*g<��<�H�QӉ<�K�N��;�%X��}:�Pv�������=P�D��Q�;�G-��%X<��s�����>&�N��<O�K��8˼������P�(�Q�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045705
data:
9source+2)
'app/Http/Middleware/CheckUserStatus.php(d
<	file_path+2)
'app/Http/Middleware/CheckUserStatus.php(e
(	file_name2
CheckUserStatus.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;

class CheckUserStatus
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        // Check if the user is logged in and the status is deleted
        if (Auth::check() && Auth::user()->status == 'deleted') {
            Auth::logout();
            return redirect()->route('login')->withErrors(['email' => trans('auth.failed')]);
        }

        // Check if the user is logged in and the status is banned
        if (Auth::check() && Auth::user()->status == 'banned') {
            Auth::logout();
            return redirect()->route('login')->withErrors(['email' => trans('Your account has been banned. Please contact support.')]);
        }

        // Check if the user is logged in and the status is underage
        if (Auth::check() && Auth::user()->status == 'underage') {
            Auth::logout();
            return redirect()->route('login')->withErrors(['email' => trans('auth.age')]);
        }

        // Check if the user is logged in and if the birthday is set and the user 18+
        if (Auth::check() && Auth::user()->data && Auth::user()->data->cpf_cnpj == 'CPF' && Auth::user()->data->birthday != '') {
            $dob = Carbon::parse(Auth::user()->data->birthday);
            // Calculate the age
            $age = $dob->age;
            if ($age < 18) {
                $user = Auth::user();
                $user->status = 'underage';
                $user->save();
    
                Auth::logout();
                return redirect()->route('login')->withErrors(['email' => trans('auth.age')]);
            }
        }

        return $next($request);
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0�=����<t�z��u<��<��޻�O̼eXr<�e!=�R��A�ʼ}��T��u=p�����'<&_�=�K<��?=�E>=6�<F����3�;�GS��f7<#
���(��|�;1�X��P��l�:o�
��k;�_=���<íӺ�\=�'�<�Ԃ��Y�&���Mǥ;l�6; �}��>�<ab鼰��<���:�(�<Zܩ<��������<�o�\W��.�;�P�twV<�:�<��\<����]l�<VWE�7��:�!�J.j�)�Ƽk%�<�	=���<��<8O<�ǼKL�;�=E<���=�2f��2�=���o�ֻT�<zӱ�%�=<�Qx<��;-����<u9���
,=�<F=�0:���<3A+=�'+<��Լ3#����:����^(�����=<��@V/;q���~~<F8�;u2��P���<��(P���o�e�=vl<�Ԃ��I=��=���Z=�I����_��;�=<n�/�ƼcW��2��>7�<Rʻtb$���:Eۓ<~~=�yT�(�����*=��(=!�3�ϼs�<~~<�켮�o��=-V���(�8�A���<F8�;���<D���GV���,�`M7;
�<$U�:QL�=!�;(K9���,���^���ʼ^CW��)n�BBX:܏@�S�W�eC@;�������MM|�cW�;�;^<��>��D(<TH�2�=����U=�����L<�[o� ���,,����½h����y�:�>Ļf/��qD<��ܺ�=@�!������<���*�=��v�p�M��P������f/i<��<�d9��\�;�	�<iN{��*m��:�<�2�<r�h;�o��
��<㌼kC)=vl���6c<�D?:�%����=iN{=#��D�;{��<�= _'<$��7"�������H�;iN��abi��c�<DL8���<ޙ�<|ͼ0"<����ާ<~�<1��<#�k<��(<Y�=��6��O5��46<s�=�x'�^��=�3 ��:�O�N:T��<��m��[*=Pu<��?:噉<u�
�
�~<���<"u��p�=A���?=�p�:ф<�	/<�;^<�>=�L��1�:�m�=
�<�H
��=`λr�h<)�F=twV=���;9+=�����=ͣE=��K<��5���<��
ٕ<��5="u<`M��<�|��Yq�$�"=��.=;��1�ػ�1�3�=h$�!5=ZMN��FT�X�{�
�5�"i���˸��1�9�'�����Ԃ;Y�@��x>=;����1=�ټ�Eռ�;<ŷ��r�h���B=í�<�޾<#�k�o$���n��(K�<���r�h=���<ŧ���K=A����G<{��)�Ƽ�Ҽ�����=!���xU����MV��v����IB�<k%�9>LO<z/���y�<c=���<�;�T�@=
���<ݼ!�¼�����+=�=��"i����<Q�abi��;���P�eXr�*"0��[��ZB�
_l�=�[*=
�5=&��1U�=���<_�r=���<qC�#
�<k���G�<�Ձ��y���<텛���<�E��:=+��<��&<^��{�<`M�������<��<��<b9�>Lϼh�	=o92=��<~P<�n�<�����=5�ἮP�<e�=sZ;�7��������;�	�~мeXr�縛��̠<��#<�/�;)`k��Q�;7"��=.��{Ҽ����2B<��=Z��<JQ�lv��8O�R�:�Rɻ9+�0�=GV������*7b����;�����
;?��Z�)=�Qx�����6�&������9=�7<l�h<2���� <N�<�_=�0=�>�<,>�����?<7�X;�~="K�<_��<��<���;^.����0=B�|�C�s�^����=4�9��L�&��Zk=3І=��	�mM�<��L�}ݑ<�챼�0=e�M=17K�ZMN���A��0=�|���	�<�[�p�q;��	��=\��F&=�oF<b��<���b9`<�	�<��
��Q�GkJ���ݻo$���	��d�<˙e��EU=�˸�ž�H-<�ʻd.�<� ���<ݼo��!=zDּ�&�;��<o92<��9�'=S�=�:<����=E��l����&�}����il2��7=U�7�eC�:��9<6c��R<�PK<
@Z�T�N��pܼ��<��	=w%D;�R���3���=���Gkʻ"i�;��-<W�= ��<7��X��޾:+jK=2j4�����d�<�D=5K�5�<�y�;zDV:�[���3	�iW��!�B<����<�ʼ`μ��<C�>Lϻ���<�욻~%���=0�~%���o��>�;�3	=8�A=�3�9�>D=&��8���;���UB��;^���&���	=��d<��"=L#�;��<�>���6�	��<,���	���P�i=8��<��ջ�����<6�;�\�<d�{�W��<Э%<��:�C�s<�=V��-��G�%�!H<c;ҷ���:������y��<�O�<�e8<�챼�>D�F8Ἡ��;�z���3 �-�O<��ŷ���
�:��b�	<��K�d�{�[���TH<r�h:&�}�ф�<&_<�7<H-��~<~ɺ���!=�	�Aka=o92���H<A�J=����b$.��è��臻6�<����EU<>�*���K�9���2�<��<o�<F�<���;"6���Q�<��=�qD�y�Ȼ�Ӛ;���;<�������I����<Ea�;X��<}c�9�1���)�<
+(��<�o�E��Aka<QL�<nb;<�(��Zk�^����:�<r����I=�̉��P�˙e��Y���<�GS�@,�z/�:w%ļ.9����;�u<MM�;k��< ���H�3;nb;�����<��<8j���R=�׭��28:s�-=&_<�2�6�;R�����Ի�<=6�;?��<���<1L��O�<+U<�Q<V��;[$ź��ݼK�ż߮R<1�X=Э%���=��I�!�B=]��<����T�r�]l�<�G%���Q��N=̷���/�<�0#�N��$�<};��\<F�<�@���}�<��*;�#<f��:Pu�;-=����;E�ŻxX-=�e<,,���ʢ<� v����;��ؙ7< �#��0��;�����<"6��1�ؼ�=���x�<��;65<'tB�������5=�QJ���?���4����<Ea�:�O�<���:�;��2��:�\@�tb$���S�n�$=�t<Ra<��'»Eۓ����u�.��<�o��y�<ZMN�θ�:�GS<5���zӼT���)��q��9��̶��<�Py<%��&���zD�;��"�1L��zb
='����2<K�E=
C�ymߺ�<�Q�����<�P�MM��qC��U�-t�<������<d.���፼�&�<����[*=1�X�� �f��=o�V<s�<��(<.����.<�
ż ����<�yԻ&�K�;�a<;-��a� �IWs<��9
C<\�	��:1<���; �<�2�;�S��Ak�ab���;���<'��:����o/�e�ͼ�w�<[<J����<����kC��=J�<Ϟ��͟:*�=3І��o�<r�h��>=��;�G�<@劼!1=��gM�<��޼:�!�k�ͼ=uؼ �=i�V:'��n�=B�|���<�;ǻU�7=X���B�|�.�<Aka<���D7�]�����<S�W��f�<~:_<�1��(�<�Y��nI�X�{<"KP;^(�b�	<��;,,����y;zӱ��o/=s��<�=E�Y�<.�<�f��f ��U=,�<*�<��0���*ƽ<b9�p�q<܏@=R�����=,,�<�p=����q=�OL�k҄;�c#=�6=�)n<\��<����<�<�:=Ϗ�<�d<j�����޼9�<�u<��i���̠;�m<;����=gM =]l`<���#
�<|ͼ]l`<4"�DL���>�;&A�;m�-<H-�J��<�)���<�<��
@ڼM��;5��;�<J.j<���<77��
,��o����<=��<����[��;FǼ�D�*=@,�xX-=Zܩ;*ƽ<��U<@,�u�
�!tY�U�<d.�<�1<ͣE���6�(��<��o<,���{�<]��;UB��R�<��(;�=�"�+<����[�<D7��L����֮<�	/�j����<F<�xռ��U=H�|�^��<��<3#�;��;��<vNͼ�<����Ｎ��:�y=��37��ɼ}:�e�M<�x�����<	�><�Y<>Lϼ�28�:塻��o<+U�<���<�<+���il2<�G<< ��:9�<�u:h=Y�=���p�M<��;iN{<�6��&û�	=o�
�(P�&��;��c�B`�<ɘ
��;^<�HR���+<�醼�c����2���0"��=��˼���<��)�F����u��<3A+�qC��+j˼	�>�m�_�p�ͻ��<R�<,l�!�B���<�x'�T<���<��y�n�<c��;�1����:��;�4d=^���'p<9���yT;��ɼ����Э%=��;a��h�<�oƼ �˼}�û�n����<U��-t��B��<7"�<�z�<|����G<=clI<�԰<NA�!1�Y��<ab�]�I<	i�<��<�0=d�:8O�7�;_v@<���R�%<�z���OL<���!=.�;:<�d�<�Q�O�μ�ߏ��pܻ�d<�H
�B�����=��+���p<��޼�֮;��<d��;�鴺�&=S#�����<KL�<W��<pl���#;!��i�;
��<�>=�z%��H<��F<I��<��p�J.j:íӺ�zS��뛼6㼶�8=�O����;;�/���o<=uX��	]��E'���)<���P�<��y����<R��;=uX�zDV��c<���<=��<��Ҽ��(;
ٕ<zDV�Ő��q��f/i<+����˼:V�;Y���c�;S|<^�2:z/$��y<17�;�w�<�:H�܏�<,Y<oȍ�MV�< �<��;+��<?�<Zk�<�==����'p<�p�;]�I<���T�r��F���w<�n�<��+�f��/ﯼGV��%jb:$䋼�zS:��=��;�e!=��< ���u9�;>L�<m��<�)��tb���<��<T���m����<2j4���G<�;9�0��<�������	ic�u9�:���d.�	��<���<GV�<�F�<7"�<;�<^���w���8j�:���ͣż���;ф�<;�<�q-<Zk���<]�=��n�IWs��p\��՘��>[��׭<�'B<��7��;$�<�c#;���<�1��D�<s�_;�ʹ�!tY<y���=97}<J��2=���$U0�h�;=�w�<��<���<NA��ր�+jK���:�	��iN����;θw;���3�H�3���"�+=�֮<}ѻ�Ҽ5��<��<�;���3e<���;K�<��/������ڹ�I;��<^��;ɭ<=IW�9��/�A�<��;�2<�;=�2���&;�w�<�5�$��5K�����BBX�?����+=Ϗ�;�
\;J8�>L�<iN{����<�)��(P�쮤<_��<���<��Q�"�;�0<��<�;d.��s�<�,�(K���P˻^Ҳ�n�:��g���<Ţ= _'=[��<��#�c����=b$��\� ��̠;�S</ﯼym�;�ü��<a�����Q�MV��5�/;θ�<3A�;:�<K�E���ѻ���<FǼ�n��<#~9�xX��2��;D�<�=�K�E<5�a���չ�&q<R�< �K;B`����<[=Ϟ���m<텛�M��<,l���ؙ���y�;}�C��(��'�<��Լ[��<z�1��q�o$�����<�2�<��<j���OL�s��<%j�;�=�:=���K�.�˄39W.�<R�<�ļڣ��L�	�>�;��<F�
����<k�M<��<�w�.����=�F�<�����{����<:<�|;w%D�߮һ�f	�,켦���s�<"�t���T;�	]��R����)���	<(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045706
data:
8source*2(
&app/Http/Middleware/EncryptCookies.php(d
;	file_path*2(
&app/Http/Middleware/EncryptCookies.php(e
'	file_name2
EncryptCookies.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;

class EncryptCookies extends Middleware
{
    /**
     * The names of the cookies that should not be encrypted.
     *
     * @var array<int, string>
     */
    protected $except = [
        //
    ];
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�N)�ϥ<t��%�uU�;K���$����;����
.��a�"aH�j�~<r=��"�_��^��<�a=iۓ<��%=�^0=Q%�<�ڼ�bW<�Y�ٯ"<�����=�`=M{<��p<��<�Q�<-��<V�`=��q<�K=��S<�V.<��<.�μ̾��r�(č<���`.=9�<>̼��:O�0�"a�<���<��J�������i
=,r��O��<��=�3�#Ŗ�5޼B��<�6c���)=�B�:��¼����t<!B@=ϒ,�H3B�ԑ#�!����=9�̼x��<57���;]�
�F��=�W�;�[����@��<�P����7=�5W;�'�57f=x����tp�2�E��üٯ"�2��;��<;����|�DG*��2?��BF�/�޼�l�<��-�9�L;����ɼ�P�<�`E�0^-�Wb;~4����<�C���r8�)w<�"=I���<aM��o�m�e�C(":CC;�~ļd�==��<^���W
�<"a�<�̕=T�H����<	��=��?=�q<�;��i�,r=�r����(=v��;����zA:�-	�o<�{�<|��<�$=��I�m����� =�[��F�)�o<=��<�t-���I�!B@���w<DSS�;{���ᆼ�&ټuBC<M1<� ������4��$���<XHy�+S
�!B@<��~=}��-	=9<gE^=��<1}���|�!6����<_�F<W
i���*��bW=�RP;~!)=�uy�)�W��/!=|Đ�����3�M��i
<U�A�컥�l<Y�<���<�o�;\a=��!��*�;�H�;��R=�8�<~!�;h��<�a�<~4=8�D=��<������8t6���(��i�<��8=�-�ǿ�㚱�2v���'b��6c�P�Y=9*���<�,���D��~!)=M�r<��ۼ���*��b;F��;}�Z=�SY�e�E�Q��+S��C=�D���H���!����<��:-��<��:	�;��m<�B�<"t���QD;�X=zA:�zA�<��m���;��v=|Đ�L&��#Ŗ�M�r=�3�;m�=y�s<�D��f�<H����CO<�"5<2��;&��8�D���������s���%
���0;��[<����ؐ=#�X�+@.<&�p<T��<��0<�u�<O�Ѻ�b�<A�<�[<k8��~��;�Gs��
�ʦ�<K�<�'b�L��j�<���;�QD<d����0����pi
��<8)�Ł_���޺@sd��֯=��(�*!&<��p��ᆽ3�2�E��ȷ�/ �<�ل�����z�Ԥ����.��c�<����� #=̾�;uBC��M<m����<U���bF纊|��jE�5^=�⼁�I���u��׸��<��v�����2�=��ۖ<���߻;Ue<r�ݏ�C;=�]�<ٜC<vt*��<
M=�.<�8/��涼uh�;W
i�O����I�dɽ���"��?�Y����!���=��l=2�=����<	m���^0=�4�;ؐ=Sc=����0g=��< �q;�<̾f=#�X=����~=p$�<��<ME���}8<XH���U��� ����κ=�<���<\a���ƥ�s�	<Q%=W0���,�U��<��)�<d�<
fu=m��4���a�4�<��<K�b�H��rƢ<��#��<57�#Ŗ9�Ea�z��<�=V�X�vt��ň��*<ռT��er=�8򼁝I���𼙘��)t�h�n:�=�'�����;Ue���@;����J��L���3�<���9�<��c���&��B=\a=7�����<F��V��aM=��=vt*<��
��(���2�<ceo<���=�=K�F�=�j�?H��9�L<F�)���?=�7��o�;Ł�;�c��&����5����=H3B��<�>";���<�U��Ϊ�=
�����]Gp�1�����<�h�7��;�x���<qbԼQ%���2�<Q�i�˟�<	(e��r��ܟ<9�<�j<�di<��-��7���żU�<Z�ϼi�=!#��g�$�T�'�
.�<�>";gE޼���<Ԥ�;�<w�=j$����:�cໝx��W
i<�6�<bQ=
.��1���w<��;!�y���J<3�M:HF!=ڇ��� ;���<ޛ�����<������u�&T�(G����<F�!;�����$�����-	�*<s��<��ϼ~4�<�=<��<bl%=-�%<Wb�0^-=���%5��"t'��`=�k���:��gE^�2��<��Y�?��C�OpɺD4�<�y��~D=�F�aM�ڻ�<ؐ<!�y���/;�)�;V��dɽ�&Ӽ��'<���<,~�<��2=������������5p�	m+���;���;_�<6Vn<���<�^3=�aN���	=�	�:���;氼�G�;�Wz<�er:������Q�a<��"=Q%���l��Y=j�~�B��8r=(�ϼ�֯<��K�t<?[<lcݻ�V����<ʀV<F鈼��<7�;��<$�`<�r�О�<�~A�1W�;��
��Z=�K��tp�v�<�D�<CI;�t���<����2�<�<�<������<*4�<NQA<��=��	��BF����;�f�<
M��ޫ�~��<���n���<�[�<8�#=kK<�SY<�-��ʆ;ԝL�Q���<Ł_=ԝL���H�K���y��S�;�(�;I�<1��<��<���<ň�<j�~�kj�0�<i�;c�=�P><�e�U�'`�<�T_�M2�<����V�`=�o�;Q��<�c`�H3B�zs����!<Z�
��=�5Z;�6c��
�;�[<Ά������:��y�a�;���S=�գ<���н]:�׸�n�<R�<�c���m���ݻ#�ؼ��X<�%
=�6�9��=���ň����*<kW���=��{�)=�\=�<%"�:�=�2�$<Wb;��;�16<��<WC���̘�\N&=pC�;���w�=�;��{=&A7���=F֩�=�����B���<L�j����<����k��^�;�e��)�W�Y��;��'==��<r�<XO/<,<��3�dɽ��3żW
��;`�-�!#8�v��F�!���<ʀּ�^��iȴ�d����~ļ��Ӽ���<��I�.�N:Sc��n�;ݢ;|�R=����>�<��=�ؼ;Ue�a��9=�P��{��=�#>��֯�i=.��<�W}<�q�<����������<v�S;uB�<�D�m����������ɺ�Y��;�<k%ͼ��<�R�]��<a׻Z�O�c��d;���<˟޽T�'=��<S�<.�μ��"<;������<�=pV��7�<����<�c����6=�2<�*�߼��n:�$A�*!&��'=%"/�
T���6Vn;qbT;��<+S��
T=��A=�[�������4�<��=�vaK��Vq<t���C�<��=x���׵�uh�;�m1;�V�;5޼���<�^3�a׻� �C;=k�<Z���18o=ڻK<���	m+�V�ؼqbԼ��=��o�Z�O;��;+@�<����0��.�<l��jE�9*�<��o�p$ļ���;�==�仼�q<+S��<�3���<��<�Ҽ"�����;B�:<R�<��7���3;2�ż�%л�=bQ�,9�<���:kW4;�ݨ������Ƽ��=�j�;�R�<g�<�V.<��=t#��.<C;��IRʼ&A7��e��0�t�t���9;d�<�w�<�0�:�)t=�<;{#����<Ӌ<iۓ�n�����%<%5�9&��<9=��h���r���0�;�Y��L=;Ue��Tb<�*}���I=��<�S�<^����<�^3��$=��=gk�;�	�<�R<��=�=�����f�g�$���Ҽu�<���+@.;Wb9L&�<���<0^���F�<�{;b���"��8r<��;����z<�֬���!=��Ȼ;�<�p�;��F����X)q<x��<6Vn�dc<ԑ#<���9��p<}�<�QG<���:��1�A��<�Ǯ<.��<6�<(�ϼ�[�<�Ŝ��C=�Q�<��<�R�;c������������&��ˏ<��^����<��<D4�;�2<�ޛ��aW=�4ѻ|��<�9~�va�<��<Xn�<���<Q(=�-<�z���/=�P>���f:�Q�<�P���=H�;el<��S<�#�<乹�	��<�c;�(��`ż�b<���pϼ���:>̼��зq�=7u�<��&=�}���<����񻷄z<s�l<��H�{<"�<����� #:��:�M���<gd�<(�O�i�=c���ME�<�����x�#��XH�;�W}<��o�;p$Ļ��<�ҼME��4�����P��DG*�pC̼^���sg�.�;�֯<9=�r�=���F�9�c���DX<�b�;��p���ټ謇�옟;���<(�.��'=��ܼkK���;���e-=j,<�<���<P�;�i
<i�4�,���ٜC=���X)�<���;�G-=�ꗻ�鎼cڻ�E�;��޼�[�5޼qu3<*4���ۼ�6�Aꑼ�/=}��<i�<;��Ἴ�7��{)<t3�zT�<���*���<�aN��R�<aM�ʦ�;gd�<�Z<҂��^0<��T;+S
��r�<�$Ǽ�u��7�DZ	=x*<{`¼
�:��,�e-�i���<��Ǻ�y�������=�<���i�<����;:\=�C���W<�$�<���:kDU=�`�;�r�<���-	<�0��� �;H:=���<�Qļ�鎼���<DZ�<k�U���)�<;�+<�������t3<lc]�]���"����<���,�<��7<��;��V�԰+<�Ⓖ��<zs!<�����Q��Y9�e,=,9�<�r�9������O���㛼6|��б�<�D��J����7�
�'���Ł_;.<H���虨<��7<�գ;������e<j�<�RP=���6|,����<a'�<ǿo<�S=Z�
<S*�;7͛�E���Y�y5=��J����<RD=|Đ< 0�4�U��$�<JqҼ^�>=��<Cɺ���T��]�0R�DҼ��= ��H3B<�e�<O��<�l(�i�<���=���S�;�QǼ����E�<������=�Eἁ�0�y��;��Q=<̒<���#�غm�+=bFg=�O��$�;��l���/���y<pi�<ڻ˼O�<��<q�=d���oC<�i
��x�<�pL=Z�G���0�B�2��D�0q�9z��<�1�<����r�d<q�=U�P<���:�<kD�;C;=!#��T��8Df2�M2�<�O2<���:57f=�oC��I;
f=�c=ݏ=���<-�Ƽ*�g��e/���bl%=Er[�uU�8j,���ؼ�_�;�%�;����d�==DZ	;�n:���Ƽ�7�<�<i�<��򙺏tp<'�&<���,r����^��<M29�(�;��=<5p<�ż���
켆�H<d�== 0��b<��	�5޼_������"����Y;���;��=��ߺB��13�B�t<���7i;�r����B���{`�<0q��x�;�&=-�F�6V�<r�"�p7��d���&<a'_�j$��"<F���B��E�)㕼�0q=O��<iۓ�j,��]Gp<�=(�ϻ;�+<�(����О�<h�<lc�<a��乹<�;���H:<%5�<��<����G�<��<乹��<���y��;�T��҂<{J���<NQA��5ڻ�=˟^<�U�E���Op�9*��<��!�Fd�M2��y��;�d&�t#;=
��������<���;��$<�즼��Q=��n<x䡼�҈<�7l�2�E<��<�$G<j,��j=�學8�D<Z�O�A�켔��;%'=h�����
���������uBC;57f����;wř���8�b�<#�к�=�<oJ���즼Z�O�\a��qX�T����(k��ż�BF=��	=^����V����<DZ	������ڻ�oF��c��H�{�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045707
data:
?source12/
-app/Http/Middleware/EnsureEmailIsVerified.php(d
B	file_path12/
-app/Http/Middleware/EnsureEmailIsVerified.php(e
.	file_name2
EnsureEmailIsVerified.php(f
	file_type2
.php(g
�	text�	2�	
�	<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\URL;

class EnsureEmailIsVerified
{
    /**
     * Specify the redirect route for the middleware.
     *
     * @param  string  $route
     * @return string
     */
    public static function redirectTo($route)
    {
        return static::class.':'.$route;
    }

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @param  string|null  $redirectToRoute
     * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse|null
     */
    public function handle($request, Closure $next, $redirectToRoute = null)
    {
        if (! $request->user() ||
            ($request->user() instanceof MustVerifyEmail &&
            ! $request->user()->hasVerifiedEmail())) {
            return $request->expectsJson()
                    ? abort(403, __('Your email address is not verified.'))
                    : Redirect::guest(URL::route($redirectToRoute ?: 'verification.notice'));
        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0o_�W6F=�LW�'X=HM�;PS�ؼy�B<�
=M�<e?缼P���y�==�y���V˻;=�67=�6�<M��<���<HE4<�=o5�<���eɻ��5A�<�iQ<��Ҽ�{=o�J����b<��ݼ�@�=�(=�<><Ƌ=?7�<R,����;5I�<R�:`Lf��q=51��<��<��%<H�=�N7�I�;�b�<'X����=Ԍ'��:ў<�C=�P&���j꺼��?��k@;���˞�������LH=�\R="�Y�a�;޺V=0��;�-�魺"u�<D*�<+�G<a����o-�}�C<?�U<��	��q�\io<}�ͽa�)<j�:�}��;?7=o�,=e�4��u�<�|u���<e��;R�w��V�;���;�q<���
�<Rs�;t�<�7
�}�<\�:'h��ϯ:��G���5I<D=���<�`��Wvn=��U�٧A��A8�ᨼR#1��E;WVZ�y�.��������=���<'�-9t�<y��<�LW=�V˻�:H=�<ͺ�Lȼjڰ���=+c��}�;���;�ξ<jԻ��&���2�D�t<��=�K����F��0���\���;o�<��O��QB=�LW=��E�H����2ټ�!���pI�\=<����5��:��;��ނ��0���+��;�N7<�;"����׻51�=5i&��=~V�:��d=y��<�q��R"��꫽��<�<5Y�'�<�"�E<y��t��<ުL�jR|��2<?�i��67�j���������p=�B�M`�;jJ=�tм<
6U<o���<���:��X=�`?=�c;��i<H��<"�����1=�4<�O��Y<5������DR�<+�.=}��R��<e�=?��=M ��+���0�/=������˦%��5���<M8�:��]<�*�aĐ�3�<�g��?7=���<?�ռ?�K;"%��?��<Ԕ,<eӼ\)�<e��<�5�����=Ё��\����	���<�良���<�D�
�"=���<H��HU><e��=��м���ز�j�<p�<��`��IL;��\���|=}���
7<��=sr�t��;\�=yk����;y�.<��ϻ:�J��0!:}�a��?<�L�;羻5�����ʻ�b��fU<R;@�\i��M�;
f��`�<�d=���<���ٟ��Hm�;?<���::|�<0��:ƛ�
��:"�"�\y�����Ԝ1=}�W:?G#�"�O:�lk����<
6U����<� <�\��!��eϠ��u���i�<�k@;M(�<o�;9DR3<y�3�:��;M�����Q=��=츻�<˾4;��<tx������<t�7�Щ���\�}�M�}���
fs;H=/��!��Mp�;���<˖������k�<�\=H�k�5�S;�8<�<�Y�;��:��Ǻ���<,a='�F�M��
�	=0n�9�����sźyu;�I�<'p��?��H0��E�?/="u	=,�;+�Q���<y���+�$=�T=��F�R��}��<�iQ��Rm���9
�=��i����=ƻ���49<�<"�6=��'��<�逼���W�<�!|=��<H��+�)�H=�%=5I��<���<a��˞ =���t�<=�QB��Ż�.��e?绌7
=�ͼ��Ǻ"%x<�iQ����;'��<����_����t��θCT��(��?�i<"�O<���<M�v<�l\��ۼo���o���Ԕ��H5�=t��<)V�����5i&=WFл:�@�Ԝ��}�C=H�u�H���PS<<붼է<�="�<��ݺ�W6F<
�1=\�<�pI<eS��ڡ��YV;+s���N=���<��1=�(�<��d���<�l"=�����*�R��+�Q:t�=t���?/;'y�o��=z��Ё�<�+���q�;Y����<���;��0���T��Ƽ?�=+c�j�=2��Ɠ=R#���^A��싼��c=��
<�����<R�<�逼�ā�+k�jҫ�`ݼ+�ۻ�ā<��ܼ+z=�Z���D��`��aܟ<�;z<
f�;�s�;H5�<`<\���m<�n�;'��;�!�<츼�P=e��<y�`=WFP�aH�'h
�a�)�0�H�5a�<"�����<�	�'�����+<����I�;�\<�"���\	�Й&���y<�\�<�U <+����YV����S���E����<�v�<��<�=٣�H�=}�;?�i=�|f��?�5q�;��<�G����=���<�T���	��S1�	¼0��<?��؇��.��HmM��:��ov��.=��d��͢;���<�L�<oն�t�K��o�<��=�T�~~���)=���!�<ڿ;��9�<=H�����=��z���<�ኻR#1=�逼M��<�B<
����YV��.=y�V<`<�<
F�;Wv�;�2;޺V<~���~��<��޼}����Y��5I=3J��P&���5��<?��:a�;°�M��<eO�y��<���<R'<e�%�5Y����0�H��|��ؼ�#��2��?��р��ڡ;jҫ:tx���E��Y�?w�<���<��������%=H-�;��һ`lz<�LȼDb=<�
�H
=��x<a��;�4=�����$/��f�<5��6R�;~V��DR�<~n���#����[���<�8��~<�������e�>�˞ ��-�;�S��M`N;��:��p�/칤��'�<���k�ނ3<�Z����<o�<�S��:�h<H����Ȩ<�F2���<Rs㻛<2�<��1;�	$<�B��w#<�iQ;��<e��
��<}��0�/�i�;'h
:�%ڼM(��y�3��`����<��H=H�u�W�x<a��??��a����o9��;�`�;� �����<`ݻ�k���=}�ỮL׼��9��}���"%�<y��<��<:\'<~v�M(��H�k<WV�;��<���<y�ּُ2�+��<\ٔ<o_�R�<��E�"��<���:�;�%;R�
��E�<����i=j�0���<`l����:���;
&˺�g��y�<�h<ُ��\I�;\�=����{�"%x�"�6�ys;M�:"��jҫ�DZ�;!=��ܺ�Q�<�?X�e/�;
v���vм�=�H0��!��\Ye<:\����?�����aȼt�(�j�<e��?
��'���=t���R�;o��<I����<o5�"d:0�R<°��(
=��]��"�<e���y+���o��o��<o�@�+��<o����;t����<��'�˶/���S�б��:,	�ٷ�<
�<��~����<��<�)8�y����=�8�+�3=Ǫ<o�	�M�����;���"%�<�����:��#�Yt�
f�:e�/���=R+��"�ϼ��=�żMH?�
V�?��
Ǝ=�Y����<o�6�����R<c蹂���"u�<����o5s��ov<�O��sżԬ;�o�:
6ջH}W����:}��:tp�t�U;}�a=\��}�M���<
�'=+k<��Z���0����"�<ƫ�<`Lf�H�a;eץ����;R�<��:���_�����<ޚ»0�\<'x�&=
Γ;�/N<�.���;<t�7<}��<�<��ļ`ݼo�ʼٟ<<�7�
6ռW���]��٧���Bc<�����W=t���5I�<��;޺V<�<�D
��Q<��c;\)G;t8�:'o<��v�a,Ҽt���+�Q���[��N;ޚ¼��ػ
梻"�ϼ��T�0�z����<`lz<H=/���t<+�G�H��:�r��YG=�]�<e?�<\i�Hmͼ��<؇�����jR|<t�#����<�I=�ā<�<�a��<"�Y�
V�<˖��R�w<HmM��R���F�;'�2=�<5�]=����.2���(���k��LH��B=��]�+�$<�iѻ��<�.��E�<?o�<��G��!��+k<H��'h��Դ��5���'o;�Z)�+�)�+s<�D	<��A�'`���^A;����<�;�E�?��<��<:�|=�^A�tj����\�<eI<aĐ<'�м��`<\<L���<+�3:"�=��f;'�<��a��:��B�<٣<aܟ�+[=WFP�e�%��ü������<j�9H% =��;\���|��K�:
��;�<�<a��\�<�J��D����)<����t8~=\�<���<��5=j��o%i��O�<��<:HE4�+s�WV�<Rcټ����X+��3�����:��h��Z�<0?=���\��?��t�2�Ё<�ặ"�<:�J�M00<j�:<+K���k<:T�9���;����W�=�i`�y��+k��X���m<:<�o%�<�y[�oU;�S1�eﴺHM9�y뼂�l<+k:�Э:�?X9�
���켂�λ@ɼM�<
�	��Ӹ<y����M�;�`0;�YV<�B�;�<DjB�o_�����?v�tp<R=�⼂�N��>�:�;�#�°<ے<��9���<Щ0<"�E�ؼ?g7=ch�\Ɋ<DB�<��<a쩼�b���?=�l\�
�������5�g;o��������ټ�\a�t�<��<}�C<
�1�S޼���<�L=��9�����Щ���}�<aĐ�59<��s;+�.=5�q<0f=~���yu<�&-<:d���M<"��;��&=ͼ�=W��:��<��X<?v��P���/μ�@+��<�<\i��⼳�*<�d�<\i�D
<�ā��/�<\�;5q�<���<�4<���<���
=����Rm���ļ�!����<�R�:�cʻ�5d<�;1<5��<ˮ�;���;Б������Z���V<�؇<H5���J��"�����<j⵼��c�D�<�g<\�(�H-%<���<�+�<�B�<z���&<��~���3=�<����DZ�;��<��p;jB�6��b��o�"�������jR����J�0�;ޚ�;����<��=�/�<���C<�<�|� 5��逼DJ.�5��<:��<'��<
f�*<Yt<��:�M�
7<�����?��5�:aĐ;���t�˼�7�a,Ҹ�t�;
V�tx;�K����<���<o�="d�H��<�J=�vP;�L�8��5��9ُ2<
��+k�Rc�<��q<�%ڻ\Y�<0F����<��k��&����;��;,�:$�H}W�}�M=��=���MP�<�o��ނ3��LW���S����H% ��L�z�;59<�'�<�����];���<�vP;������
f�
���~v�<�.#�?�;o��<�U�<CT;�^A;H��y��Bc�0������;e�*���Q��	��
�sr='�Z�e?�<�d<�9B<51='`���W��
�������h<�X:���;�<��1<�D�a���%��e�/;�J=WVڼ\���9B����;�H���%Z<�����<��1;޺V;���<�_�<D�`;:�r;�<�3�<������<
���MPĻ'�-=����Hmͻy+<�üƫ�:ˎ��ے;ԩ�'o<jʻ��e:HE4�0��<�Z�<t�<\ٔ��D;yk��$>�����t��:\��:�B����<�0��ԩ�ުL�H]û�/�a�.����Щ�:`\p����}��W6F<j�<t��:�sԼ�U <t��<�C�;o�J��a�<ٟ<<ټ�C6<H�k<��<DJ.�'�Z<~~�⼳��<�i<R�<oE�;�������<c<�Ux<
�"��º
F߻���;j����E<�U ��L׼H�<��<\��:�޼\9Q:�}H=���<ˮ*�'��˾4=����Z=�sԺ��J<H��;jBr�e��<DB���j$=
����>��Ԥ6���D�W�	=o�<?7�<a̕����<eI<��Z<
�"�W��j�;Б!<Ǫ��꫼�
���6������<Dj¼��<�ܐ<��c�+{�;H�u�t�(=+�Q<�X�W����R��]�<y����\�;����y<�%�<ٷ�;M��~^�<���a���"u	;� ��5�S��D�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045708
data:
=source/2-
+app/Http/Middleware/LogLastUserActivity.php(d
@	file_path/2-
+app/Http/Middleware/LogLastUserActivity.php(e
,	file_name2
LogLastUserActivity.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Auth;
use Illuminate\Database\Eloquent\Concerns\HasTimestamps;

class LogLastUserActivity
{
    public function handle($request, Closure $next)
    {
        if (Auth::check()) {
            $user = Auth::user();
            $user->touch();
        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�06Vn�K7W<���R�]<m�<e���K�2��<}</<����k���p��oC)�I/;���z��<Kye<�&�=.�'<f��<4ʘ<�N�<s�������»�e��c���<<����5�ü��l<�;<�;��
<Ņ=���<�A=���<���:�
<�?��Ǽӟ��WŎ���J���<����υ<|v<�GP=�Zc=��+<aJ#����<t�Ӽ[ ���E<�j�<�F=FX�<���M',�6��<�NJ��<�;��޼���(�;u�~;[�<��><��<�钽�&�Y��<���jG=�WI��6=�\�;L�=!�Z=�NJ��=J<�(��T���m𾼉f���+�Q�=/fR=���:�h�<�=���;ze�8a)���t;�@V���Y�����-^�<��m���1;���<8������A<0,����<��� ��ó<o""<RH���3=���uCp=����j�����<j�V�����b��4�k\����<�F&<�5��=�<��{;PY�=lK��&�<2�5<�B�<��I;�t)�X������N���<�2b;Q�V�ɞ;@�;��v�<pd0=�}�<�q�!m̼6��:�Ԥ<ɿ!=��:���=�-�<bk��������p�����<
��<ۻ;d⻱����X�<s\>�ӟ��o���2��LﻰA�b�z����;=>Q�K<�a<(��<8�&����J���^���n��<e����м��ܺ�v˻`�� d=s��������=��3��o
<��-�?O��7�<���g��<�O��a���_&;|�}=�p�������ۼR�<^�*=���O=0,�;�y��Y0]=|���#��;<"ل�1���6-=V��=��O�|�<�wC����=�Á��/���<f�Ƽ��O;�r9�ɿ!�l
=e��<R��"�;E	�w>�P8�<�i<�+h<���<Z{�(Z<y�<����M��]}=���<-��ܸn=�Á���g���d|��!�S���<��;f��<aJ��W($��==�=ö7��`3=�D����+=���<aƆ���W��m/<<ۻ<����'��ɞ=aJ�<��%�_��;WŎ<��;��<T7=�Uٺ��<D�^�B?�=�$=h��<��8_�;
���M<��=�#�<�BƼ�ʭ;$�=���
=
<�
4����KX^�PY�=�
a��8=[b��5o<<=��;����4R�����[�<>ː��Gм/E�<�v˼WI+=m2M�K�s=����
��La�M�����.��=b��;(<a=��g�V���y��[��� ��^.='v6<4�
�Ņ�<C�I<�U�<X�G�������R'��<_��0���Q�V���.���_��o<2����v�<=�t��\S�鈴<�&<��J;�c=�;̻����5o�<�~�K�l=��=�U��"���Zc<�{j��}Z��V
�m2M;οh�|�o�C��<m�b�YQ伂��<�=��û��<E7�=�v�;��Y=7w�9y����}Z=s���6�ѻ���<ۻ��<�m���H��#���=ht<_9�<���b�1;�����<ʻ��ֹ��:<�1��E`<�X�<��u=�D6��Ҵ<B?<�����=��:����;��;Õ���
�:���_�<��l<��ɻ�򮻏�4<뙐<�Żu"�<��5�����e!����<[b@��z���V�;A뻑5�<�yz�t�̼������L���P����<�(9=�7��v�CG;��\�;D��;"��<���&�=Qa�;=�t�p�7��b����6=
�=��=Z��;0Ҋ�����=zD!=s0���-�mƼbk��Q�V<��=�[=>��D�^<*��{m�<;"=[���;̼^�1��U<�oQ<l�0�ht=/�Y��f�=Ņ����<�%
�$�<�ਹ�j�<=>Q���<�l���屭�Z�=�Eu��0=�Y$���
;���d�
���=d|��<�h%��&<��t��PO;o����
�;mSԼ���*�����X;��X���`=�]��T�@�1󑼖��;#<�n������|<{
�<���w�6<��B��9�<�m<�
=@��<B�=�?���Y��� �!��[���� <XV<.�5=g��:|v<���.$D������d;0����Y�{Lڼa)�;���<D�W<���|8;���$'<�	�<mƼ�D��}�=|�o;�x������)�<g)�<ܸ�"�
�<�>{<WI�;�{�<t�L��k?�db��¼���:6�Ѽ��2�/fҼ�0�Q��<�^��eB���@=�
<r���Ch�;t��;65��G廈^.=���<v+�<�W<�V
=��V<��<`��:���n�p�����[�*=��d=�<)=�E�<u
;��<�>��h��db�^s�<���;)~�:1@�`��<��;d|�<����=_�<��<�m�Ï<^R��μ�V��|�v����<����T������P��<��<�)1;�)1;��<К��A�;�G���e=<�o��Z��;��;���!�ӻ�.	�ѯ=:4ʘ�-=�f�;�<�Y�;��e��	"�1w��JP=C�л5N5���J�V���;=J�����O=_�ܼ�����xP=
��_�\��<���=uC�<�"7<6��;�����{#�I�</��<�=e��Jq��B��Pz�<�ʭ<�0�"T�;)E��t�衂�<x&<��֎�<:�;�S�<�E.=�����g�KX�<gkq�#<�<�qּ�E`��G	=��?=�^ü�5|8QaH��L���������gJj=էK����n��(Z<0Ҋ�b�f�F<RH����u��I@��`����=���<~~==է�;�Y$<{���׼ю6=�
a��C>���	<D�^��4R��=�<�e�;6=�vK��hl�D
f=��¼KX�<��8=D�޻����Z{�<�9�;���<ZZ��	��ɿ!��g-<MH3=�/��<a����<��;T7�1V';J�<�.������8��<[b���?<��H�)�}�Pz�<��ݻ��;Fy���=��I=��+;"T~<`��<��м�����-���ļ���;bk*�0�����"�����:Y�r<!�<~~=�JP������<ļ��=�~���
����:c�<Q�O�� �<y#��aJ��2��<&򙽄�'��-����<��;;6�X<?.&�<ۻ:A$�;W�*�����<��<ec8�*�'<T����ţ��{j�Jq,<է˼*ɠ<D��PO;������<���^s<ӟ���<���?��R'�R=E���]}<��_<k����,�<r��<>|<�?�<跼=>Q�=>Q�6�ѼǍ>=�vK��>��X�@�!LżRl<�{�:)��+nD���>��_�;�T���d<�<�����B=�s1={m�<Q�2<!�Z���;����ϼ�=��(;��<�$�<��e�M',��U<�o��.$D<6�ʻu��<�qV;
�c��x	<f�ͻs�<��L����<?
�<�O;�檼��&�t�ڼ<J=�[�mtۼTչ<���<M��;Y0�<)~�:󪳼�)�<S̀<k\��p��z;{
�<B��;W�=	?�bk�;P��:���<.�����^����Q��|�<mt[���<!�Z="�a�
� �(<Ņ���T=��;tb�a)=��<7�;��<WŎ�oC�<���<K��s��<���Ep�;��结»�ӟ:<�;�Ѽ��of<T���8������5|��+h=t�<��ȼmST<X��<Z{��;6��q=ǻPY<Ŧ����;ӂ<�[������Z�<6�J�'U/=(<a�t}E��*;���<&���I�<�#/=Rl=��H�"T�<6�Q�i�0=���<Q�2=�aݻ�.	��k�
�����&=D�^<e���X�G���,�#~(=�����]�<�{#=��X���l�<��<��弰 ��M��@��.��\<�?�<9FC;��H�0�
=B`	��m/�"�<��<�J<�m/=ht�<ݠ
�S0��O���#/<)��<7�|��>�;-�9�A=�n��:
<K�l���$=?p4<T����X�;�������<k\���<CG��7�;_��<k<
�x�hS
=7wu<�����";�(�����/��<�?��DOt<�,�s�<��<�H�n��.���\�_ZN=y��<���$Y<Y0�<��=��d<���B`�;��]<��%�ގ��$�;�hW�����;�<`��<�of<2�ü�f��
�<��.=$�/���<s�!��μ`�q;��
=�p�<�J��G<Q��; �/=Z{�<(�;�����2:�c�<��һK�<Ξ�m2ͼ6��;否�r�����+���_����;Y�r��ض;C-��"~��N�F�3��=4ʘ��-C<ο����Q@��F��<�����>漞hW��H��~]��_�ܻ�q=5-�<Ep{�fܼJ<vm��$�/���<D.m��<F�%���;�h׼8�&;�W=tF�K7�<����.��G�Jq,�_{�<ht����e���-�C��;�5�������A�Z�<����p��n<�3�*f�;6V8�!�a��5|<l�0���y<ȕ��{��<E�<���<9F�<8_<�����[<M�=��ȸ�*�-^��W�<
�x�l�<�1��1�$��<X�G�����#�oC):��;�����BF�&�=m��<�ӗ<X����>�����<�WI�-���Z=^ֱ��G�<+=� �
߆��<�v`�L���v�<ӟ=�?�<�~9g��<���<p����W4� �!;��μ����Pz=�W�<�Si�;"��jǼ�g=7����;.=�s��<Ξa���X�*f���}�<�a];�)��o�������<&�==�f���]���<��<���;K�l<ChB�QaH�Xּ�Q�t�ӼF��:Y0�<�g�<mtۼ-^�<�U=br;�V
�MH�<�>=g)c�=��<>�<�!�<�=+nD<��<���<��#�]�<�܁�W�;��<"�h� 
����߻ח =�v`�$ὼ�J�)���{m�<�����v�<��@�¼���;�~��N�<L�=���<�"<"T��"3�;���9k	��|v��;�	=Z9=. �S��KX^<��ռǮ�<��ʼ>��!�Z;@��<�N�(]�<�B;��6=4�
=����15����
=:�<ʼM�;��$ٺ��<���;l
<E7�<]��Fܳ���,=�.��mS�:�1#�v�!��
��6��;���<[ ���cM<��캈���Z��<C��=��n<-���PY�;ۏ.��i;rT���	���=�-�<�M��ɿ!=lK�<vm=��d=Ak��-ؼ)����¼4���8����q<�$:�cM�(<a;��;�C>�K�z<Y�y=6�J</��i�<��_�9���i���<�Ҵ<�/ȼ��z��y3�{�h;���<S0�<Q@�<|��;�*)�g�x;�K���E<Z�=*ɠ��q�;{L�<�������:�"7:�)1<6`;�cM�m2�<m��K��D�<RHz<�y3�K�����<�-�k*���i<>�	=����q�;��ֻ�w;��z<IP%���y�&�;*��8���"3��'v����<�����]<�0�;oC�<1�=�,����u�a�;=�f��`3��B�<n��:�$�)=�K����;뙐�|v�<0��<�!?�)~o=���-�<�+�;���
�c<�F��Ky�<��#�9%���t�X,�ll"�|v�<����RHz<vL=�BF<y�;Ep{<ȕw<^�*=f�T��WI;߇<��1�<�ۉ<{+�;��;�L(��i�<�D�J�}��)�<�;��=�_<ö�;����<M%<���<��Y��W<��B`	;����0<W=)E<���BÞ�Y0ݼu�����=5��0,��&�>��/����ؼ�F&<��;�aݼ�6���E�`�c<���)<4g�����f�;�p�V��-�<FX<)E��u����;o������(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045709
data:
Jsource<2:
8app/Http/Middleware/PreventRequestsDuringMaintenance.php(d
M	file_path<2:
8app/Http/Middleware/PreventRequestsDuringMaintenance.php(e
9	file_name(2&
$PreventRequestsDuringMaintenance.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;

class PreventRequestsDuringMaintenance extends Middleware
{
    /**
     * The URIs that should be reachable while maintenance mode is enabled.
     *
     * @var array<int, string>
     */
    protected $except = [
        //'/',
        //'livewire/*',
    ];
}
(h
pk

	����̷��(i
�0evector"�0��0
�0Oʈ�E[�<��<��(��h��l���T���<뱨��f;�]�3G	�6�;�z<�f��5"#<�A.<"��<����F4=q�=�:�<�A��U{�������<��Y��#s<�=�֊<��<�B�;`�^��.%=
�u=
ѣ<5(=�S�<��<�G�;�Hռ�tf���s��s>�������<�H��=	�;�!���=<T�;T����f��s��"���Л����;R곻>伻�mG�om3;*������-Iu<ז��<o<m���ai:�J<Z��l��b������#�E=P�/:H�=P)�<ǆG<�ND���a<8BN=Im+�}�*��D��no<o�Ľ
��<]B�;d��;��=k=8�+��nw�K.
�z
g�ז�O�<b�@�Nh�<�@��	?�����G)��i;���H9=@h�^�;s�:������ܼ	�<T
߹'y�=Z�ͼA��<˴��m�<��a����;G�q�<�)j��S���9(�
�ps&=ʒ�<H5���$�~=���=�no��NL<>�=�З<�m�<8BN���;V�@=��<�:=��<*���.��8BN��A�;|A&=D��;`�ŀԼ',;9��;�zջ!{u;�=yf=�*�����f��l�<��U���Y�<��6�D��;��B<�t����F���i�Z6�<���_y�<ڷ����ӻ\�Q�B�I==ʄ��"K=��`<o㐼�J��T��ˬe�8�+�@�;��C�nݝ<��C<��=�ػN	'=2��<�\�����f���S�;|��;�G1�����y1=��=2��<���=�ܼ��л⤊<��=/�<�Z�<��=��<��5=j[Z;]��<d/ɻ�H�<�A�(���)�߲�<o�=���<�s*=�[�<I<_�/
W��J=�O<t��;uʐ����6�<�4<��~�_4��;O��кڷ=O�<ep�O���:��O|��.)< �μt�U�O���y1=ˬ��'=����u�`<��:|�=��8F�<���vZ&=�[<�����#k==�;*���Ȼb��<Hg�;nW<��n<T��<z
�	�.5��*�=�"K;�Nļ�y���!�s�ѼOd:��=��z<��%=B�I�Q�=�@��>��<�'�_y�<���4<R�<��,=
��:�<w�	
�;�A�<�.!=��Ȼn׼ܼ<T'=�ļTf�<���Im�;�	G�F��d��C˼�Nhp<�Ƽ�
w�i��<����=ÿr�`=�:�Q�x��A����;q.��<�8=&�߼�Y���̼X�k:�ѿ��<���ry��1˸:��:���;h`�����)��<�!�<:y
��5X�0��<���bʌ�������)�`!����^.���<�N��(���H=����u����׺<|�H<	�q9B��]Bֻ�;�@�=�*<vZ&��z�<�*;Ƞ�8�����<s�9;	#���s;x����i<f�=��<�:;
u~�B;�<?�/<Ϥ�<US=)�ż#<�<�#k�s	�<�#<�`)=�(:=�A2��J<ե>�z��<�#�;�/�<���	�<�r��!��T
_=�f=A��<��!�&.�#�y�e`�<i�ļ'y����<�=�B=���ZM�=&�_��M����?���q9]BV<r4��!�<����������^s"�ÿ�;��a����;\(=-��<Af�;6��<�
�J�;[�;]BV;�׾��
�<#ۼ�ļ�y���;?=���AO�<6`;ҙX���9;Yaɼ`	�;�l=���^.�<6�8�x����=���<�a�<�y�:�`�;����<X=�;�闼�:�?���TC�O�=rt=���;M��;�<�G�;�.��F0y�5"#�Ȍ:�j��<��<������m�<��=Hg8�Zg<=n׼��<`�^�I<_<o(�:)�E��	Ǽ�l���e�+����Г<����!����:����꿻ep=���y��ܦv<p��<c�3��ݹ��ĩ���C�<<)¼O=Y���3aA=f5<�p�7�ī-<gf�H�=����'<N(���ü���\z��~<bT�8��z<��
;p�7<�g�<�m;qHͼ1˸�ҙX<�S�|A�:4�
<�S=�;O��!����<�A��_y�<a9�@zż�S<�(6����,�p;�(�<K.�;�;]BV��;����G=e���N�<bT/=B�<�5H�w�;B�<I�<=[���	�q�H"�;�.�$~�b���<+�	�Ʊ ����;����gH���{<��ü=�=�.)��`!���<�l����<f�*<}�<�#��B�9a�<��<AOl�O�<?�/=h���/�;\(���S��s.<l�;��1<l���r�;�:�<p�H=������T<U���EG
�����H�=P)R�.���B;';����	���=8Bμ䰼�<��������;CN��/Y<2�߻�4�<1�'=��<P�t�ī-��Z�<M�ɼ6��;\��;*T�;(�A<F��9�< �N�b�@����N�<�~�#<W</
W<1A��-`	�ޘ���:=s�;|��<�D;��:<�gX<��<�;�<F4��<?�<�0��)r<�܅<��%��"3=�NT��	��Yצ<t=�n�<Im<���:��<��G<B�8���
�y�=�
=�S��n�$����<�/Y�Ƞ<`��<{��<�N�<�'�6�=�U�R���<�]��n�<e�<>	������ݵ<bʌ<9�<��S<$(=\(=�ݵ<$�2�����ڷ�<v�uT3;�5P�����<H"����J�[����܅��Bf����о����b;�T�<�
=�\;��B��P<����b��<�乺㠻E[һ�(�<o�D;�zm<�:���"���П�@zE�+)�;$~<c��<�ĭ<?�c<�B����<6�ɼcn�;��L=���<�#뼦����<j��<��йyf=�����<[��<��P���w<��)<���P)ҼR�3=��<T
_<MN8��A;N��M�;����ټ@h�@=VU�s<�;O<QtV�
���*ʀ��/i����<��߲ܻ\��;N�;�!��G!;
�ۺ7(���r��Bf����!<�Г�5g���A6��&<��<�Ї<%s�gf��_4=j������5���܅=	�=�O�=���qH�<���<r4���`���)�<�S<]��<�!�; G�<	Ž<9HA��)��m��""���%��=�Z:<*z�A<���<+�'=ɽ��.)�(	�;��;慗<'���tF=
��<Ƿ�P���5��x�*����<(	<2��d�����<����G{}=GM��`!�"g��]�3��㔼i����He<�����4<=n_�ZM�5�<E[�<[ƻFa�<��<�5�<~aѼVU㻌f<�z]���P�iV=�"�:���;���<�Z���gȼOʈ<n<g<��<O���#�;LHE<[F��;�=+�'�[ݙ����;���<��!�$<�4���n<�l<��X;��=~�s<y����?<�"3�l<;��<���;�G)=��麈n���S��O|=#�E:�П<i��;��<
;����<�r��)Ƽڷ���F=~aQ=��������q<�ʤ��Z6���<RI���.=���<�f�;�T��Q�x:!�	�ep=��
=å:=�	=�����4<]�ļ,/��B;��Z6�h`;�:�C��F4������J�R�3=-I��>	=|A&<�T�����;���<ps��F<8�+;��q�h�<�Z6��ps&�1���N̻��=|����ʤ<��=���e�<e`�<ꧼ[�<�S<d=�f��;��;
G�<&.=�(<Ջ=*z:���ˬe� �μ@`
=�m�;�5<�^<�l<[�=���Hݕ�ʒ���:��;�E��ĭ���;<���<�:;�B<x��<����.�
<�Nܺ�G1=h��<T<f5<���a���;.zA;�	�<��<��%�������:��<8s<[�<��Ӽ����"7<��(<@�<��<x��<�ݡ��ʘ:�/�R�"��B��f��������<��;;^�Z���<�ւ��A�<å:��(�<�t�:i��;���<��<B�<.�y=,/�:G�ڼW�<�:��$�;���<3���;�<(	�<Z�ͻ�l=��b<~��jѷ<�)j���̼X���s�<}ͻ��S���%��.��k��ĵ;bq��gP=�f�:7ㄼ"�A�5,<�y5���1=�mO;�`��z���
��/�p�뼫��;޽�O�M:�(6=ܺ�G�<�|�.����y�<\(�<E�/= �N����q�<QtV��Z�;4��r<�?��;gf���B^���`�u�;�h�F��9��J�^s"��)�<Z6�	��Ȼ������:)B�x`����6<�Bn;@h�f��<�s��L�g��He�˴<�#�;�s�<bʌ;W��<%���~���"�<�0��`)���=��<R/�<�N;�.�<9�Һ0U[��܁�{Uk�5"���;G��gлvZ�<~aQ;B;'<Qtּ��C�.��<x`�<�ײ<�S���:��<T';9�;�<��1;46�b�;g��;��=�	�; �N;W��<)��;5(��#=kG<K�/����<f���iA"=��)�ŀT=��;9�?�c��l���q�F�"<^�Z<�5�<m��<�gH�Yצ<,tN<}M:9H��5g4<Q
<q�＋��W<���<�=�x<�ײ�e`�:�f=慗:h�<�G)=J�c;���B���ҙ�<���<��꼈��)�<������ZM��M�;z;�������5�Tf=�4���*�`�^<B�ɻ$�4�7�;�Г;�)r<cn�<�5�;�t�+<]��<
G=;��#s�|�7<ی��A54��A��GM������Z>�>似�:�����_y=���<��8��,��4=*�������<�f$=˰<��:�s:�N�=�\�m"�;��b<�S<
G����<��ؼ�2� 0�<B�ɼU��<��O��B^<	��:b��z;3���ʻ'�=�mO<��<�;�;7<�����:�����g�<Tf�;-`	<(=bT�<E���h�;Ly<D���:��J�����̻-��;�#s��gP����7(�<�)�;�[r<0��;���;����""=��=�f ;���m<:��b������Nh�:ی><0��;�"�<��=:��;q��6�ɻ��<~aѼ���������?�����
�:j[Z<Y����l�<���B;�:&H�:D�;��;Ya�:�����$��y!;�H]��gP����0=lM����	�==���<#�y<�m?;���M$���ڷ<(��A��e:��ƻ
G�<�(�<e근�h����<��~<���
ѣ�-`	:`�^<��S=�Bv<T��<P�/=��<�"˼�'���ἰւ<���US<�@�<$m#��.);��Ƽ�����T;=!���`%�{Uk<�ײ�3G	��l��m7<~��v�7�ŀT=X���q<�)r<å:�AO�9B=~aѼ��Ƽ�y���mO<�;O�M<��<0����S<1A�_y����==����:�ּ���;/;��ŀԻ����,�p��)r:X�"=�Z*=�������{U�<X��<�Լ
��<H9<(�
�4�
<���<��=�'
��y�F�����2��;-`	=�ݥ;���4�<3G	=���;�)�;D�+<}�o���X��n;�B�;�5X�BF:]BV:��=B�8=y�!�	=��̻��v<�
��Od����<�ĭ<\�Q<�`�;�����<�G%�>�+=�g�;$��Ջ=(�O仵[�<������,=θK<}���sĝ����<�l=�	�;�gлܽ
��	C<Yצ<�M�~���]�uT�;��<�[�<\�:�x<���/
W<[�t<3G���;�<aę�e`�<�N�;�!��^�ڼ�<6`;D��<H�<ĉ<z��;O��<1˸���鼩s2=��F��ܼ�:�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045710
data:
Asource321
/app/Http/Middleware/RedirectIfAuthenticated.php(d
D	file_path321
/app/Http/Middleware/RedirectIfAuthenticated.php(e
0	file_name2
RedirectIfAuthenticated.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\HttpFoundation\Response;

class RedirectIfAuthenticated
{
    /**
     * Handle an incoming request.
     *
     * @param  \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response)  $next
     */
    public function handle(Request $request, Closure $next, string ...$guards): Response
    {
        $guards = empty($guards) ? [null] : $guards;

        foreach ($guards as $guard) {
            if (Auth::guard($guard)->check()) {
                return redirect(RouteServiceProvider::HOME);
            }
        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0[%`����<�F;���<�iJ<�ɠ��
��k�<	A=0K<����o����<���<��K��μy�.=��q=F&K<��a=���<��<=?/�,�O<qu�j�;�F꼱��*N�<��<��<\v�;�4���:�G=�3H=�$�<�2]�xN�<Wz=�%Y�I߃�X��y�<�}л�/�cO;:��d<�g����7<A��<��ۼ)U�<{AE=ge����([b��h�{	=B�<P,ۼ��S6�<�Su�A@����5�~�6�a?�< ��<�e�:����L����s��:�Л;��<~�6=��E<]<��J�t�]��;�(<���(!&�Uc��	袽a\Ƽ-�Ⱥ~�r;c�=�=��w�o+"=�穼���;Uc����<-A�<�Ls���K<�����9�;������(<݁<���v=%hm;p$u�z�ȼA�
��*����<~��7f��<7�Թ���;@����A�<��ּ���<<�43;��U�'�)�����o�%=��{��B)���=����t��Q�5�k�R:�Y=UR<��@�V����;�-�+���T�;ZI+���[<e+p����<
��<S�<f��<��h�1a���V�3<b�<�+��'b=��@:�ɼ�R�<�GN��Y7;�{3�lʒ����b]�U؈��g�;1ar��S�P����G<S�<Y2뼑W;�j;p|�;#��*�=&=�q)=�ȼ;#u��N�)�����o�=q�;	�"���
못�Zi�mUK=������k�k�����@���<��.�k�R��T<�
��C
<��<��A�F&K;�iC=;F�N<"$�9��=�?=���;��<���<Z,��;~B=ߑ�:�����1�<�'/=����I߃=U��<�|�2x2=i�]<���<}޼��F��'�;s����<���pż�Ex<���<�����j.:�?����<�E�;�<�GU=�0���;iڼPՀ=F�����,�O<C:�"|��݁�=��K<�+��μ�N�<��G�$<l�Y��;�	��r��<���<?}=���ܻ��:���\=wr<���9��<�3��L�<�d�
�*��L�=����I$��H9<#͡�ѥռ�;�̨;~�<�=�<	{;j��<�[<N��;��	V=�oH@��3�;��G<|u#����Gw�<��<?�3=�}�=����}n��&.��Ŭ�<7�T��8�����<�空�1+<��v��6��ּ���<��v���^�<J�t�I�x=k(���<ge������[%`�so����=�m�;�q�<���ι�<��ͻ|�N���'(= ڬ�m;��=�2]<�̨;�Su�\v\���GN����<.�&���;2�n�S6����M9��B�o��U����vN<<	{�]�:;�}й�=��a�
:~�<"|%�d��~��-�ȼ9n���=:�I�8��x�S=��;�~��u&��n�;v�<�h��Ǽb�¼M���t.*=q긺�Fc<��K<���<8�<��=Sp�:�����4������=�;�a����Q<��=�{3��!=�n!���K=�+�[�c<
�9��Me<O�޼\�V)=p�<=��<}Ɵ�
�u��`�;�*�<�¥<�����gt=�F�;w�<v�"<��q=�@���3���
�A�
<�뜼���B��=�<ߑϼG	�<�G�<�%�<�gt�2[=�Ϸ<���8�8��=�=NP&=|㽻�T����<��	��}P�iX�����e�<VF�=�n�hǊ��ٻ��F��Y���>6���{�}nv<0v<Zې�X9�<��뻒3O=�g-<���<jbV<�N�9����<���;����n�)����}Ɵ<��!��2d=i�!=�{�<1�<)U���7�3=|X�+�S<�C�~o<6
�8��6�s����*<~��=^U�Z�g=�n!��M<8�<[�c=f%�y���ܼ�u�̅/=�~��7{:�sݭ�Z�g�����8�thf<��;����;�Ƙ�T��<��L;��a�����&-�2
��W��l�p��<�8����[=[}�����:-AL9`l�=HS|�/����=O�"=��<=�S�;�o�<�D<�r<1��<#=ι
=3ɮ������u�ߑO<ŏ2�
��"_�:N�=�����-���W���^�fB���%<7{:�����ټ���<�F�<;~B;��ּ�}I�����(!=��<%ݴ�$�t<7��<ʙ<0h���<绪<�|�=N���([b�{$�<�J�=_/����T��<��;�	�<1ֹ����j<c�����.u��y����T�;i��j5=�T<	�"<�k ��^�;)�Z��iJ;�Ի���<�ɧ<��<h5�<\<H�%<�%R<�&=����;�V/���<jbּ�,�;`����g�<1ֹ��=�z�/4A<F�λo��=���d2<��f����<��ƻ�c3=��h<���<2�<���Wz��ù�<�ٺ�\�#�(�޼�t�<կ
;�d�r�1�����sj��k�<�q)=)r�;O��;�
����;#u�7�&���y��	�<2[<D��;��ۻC:�$o<F�μB�ݼ��-����<���;�ۉ�xൺ��<�2]<RP�v�:iX��M=����q�<֋?�}4�<�g-=i
�Wz����2��;��:�1�RP�(�<���<Ȃ��$���3T�;��Q=���e��r�����`���<���:p|<�\8<|z�bs�;�Gλ1ar��<,�O�T�H;l=qu�;�����<��Ƽp=�'(��j�<�n�;��<��<e���*~�b8{��h�;�Q����'<�8�����<����E��SpL=�d�����x×�"$��Y2�U�;|z=L:����;O3��$< �ʼm��\v\�L�;����S<1�<a\Ƽs�<7�ؼ��$�1�=^U��;�I$=A�����<�=��]��<�v�;d��;��0<[��:J���ګ�	V��p_=\���$�<K��;�?�<�'��= �;E�R�H=:��<�d�<�'<&=�w@=��	�x×�$����x�9�ɺ��q�H��<cH=L�m�V�y<\�#=�`+�;�~��GU��e�<���<I�:$�;c�>;Y�.��9<�M���<��,�y��<�������H��<#��&�i�V?v��źbs�<hǊ���A�����a=oh��O4�.X�	=���?�<��{;ly��ܥ�:��������<��V<���<\v\<�W�<@��}��oH@�KFq:bݼ��;AG��I�nl��
X<~���<�:C;���.n}�c���y�<ݞZ�~h���<����땼
��<�>����<Ȃ'<�!�_/��<C:��d<׿�I@���o���83;��!<�]#=S5���!����a���<�Z�<5�߼�3=ߑ�<��a<s�<��ʻ���;��<����)=	���ȵ�&��<ȟE�G	-�P�;=�<N���G���%R��8m��y�<ٲ;���;`�<p_��c��J��<P,[9oh<�v�կ����<�}<k(���Q<�T`<u�<�b=:��<կ�����;�\�;���:Q�L��<XV6=�3�;~��<�(<�}I�;-F=��K=cᠼ��a�<a$�U���}=�1��hoa��3�:Y2�;��ؼ���<���i�<P�<|�A��v�<�%�;����6
 <"�?�C"������l<�?�<
�u����<�g-;׿�;|s�|�A:.�D����<֋?;W��|�;K��L=��<ѥU����<n�G;��ݼ�d��@��<`�<hǊ<�b��F��Y��%�5k�����<������<���<�1�<��
7U�&=���	�<Q<��"=c�w;�ŭ9B�<V)=|s;�}�<$q��@�;B7�P}׼�g�<[��<����W�r�8�6<��<O�����Q<%h�<�T�����x�S<�D�Ѹ�F���l<�
�;�E��ι
<�ȼ<��{�I@��Me�v�;�2d���m<�H9��o�<�5=)�Z<������_iQ����<D�<#��:��Q���-�2�n<�V�<��|;o���:��;w�׻S5�N��;����ak:<	�<r�m�\�<�b�ɶ�:��<�>6���<��<@�=�ǃ��vջ�[T<9n/<Wz<�Ҹ<��:ܥ�>�o<]�%h����<�d%���)=��X�A��;XV6=�Zi<:�ɻʒ�<��7<�:ʻ�P��׿=����h_�
�<���;GwǼq�<C:=��=P,�;�<�x����F<4�c=g�Y��;!HG�s�;���;j��;-�Z,�<~=��<���=/����4<�c3��$<F��<x����=�"���Uļ�`+<����'�졔�Q����<��=}4��1a���ѥռ[�c�0K<^ջ	�<T�*�y1��/����#;�u��x<>��r�1�7�Լ��ʻ��[<Z�g<����W�!���=�ak�����PՀ<���<�:�;.�D<A�
<�;�
X=#ux<M�=lʒ�
�u;�r���ϼ�J<�b�<�P��I2������!<�߼�1��,�1<w��L]�;�.�<�ɧ<pS<h�(�U�}<ٲ�<]��;�F������G�=.n�:�u�:�v�;ʙ;֋?<�Lz��x;�ޑ<{AE=+�5���<�F�;���<�p>��=��<��9>q�<��6��％{3�p|<q���1�;ak���=d�s<gv=�'�<#;<�C�Y=r;5<7�X���=���e+p<�|�<
�<�����<���G�/4A<��<��̼�r;���<�x�<	����<�؁;<�>��p�;-A�;-�Ȼ����0v<A���]�<�q0�8�:�*<�<X�n��:�<l��Ԏ<�7:�w��HS|�ܥ��'�)=�{,=��9��J����<�
����<�
;AG<�GU���v�[}	������{�5N	=|X<<a$�N��<V��<+��<�&D���<Wz<#�!�b];HS|<��;�C�<��ֹ�n!= l�<�ϼ�T�<��;ѥU�t�b<�����vջ|z<[}	=|���h�<	{����iZ<V�y����<��Ҽ�%�;�6�;4�c�I����G�<���/4�<�9�<嫗�I�x��<��H�ü��{;�]*�gv���	��y�.�W�<�u;�T༢�}<�$�<u
_�cO;�]<�����<�!=Q�S;-A�;�r=�$�L@�9T��ii���蔼M��:|���<w=�@ں'b��7�X<UҼW�;��"���ۼ
}�<Ȃ��/��;��<�,�<�#<�	=pӼ�'=�y����0����O¼�5:'b<������=��:D��;��:�p�<�R�<f�;{�;�Lz�Ŭм��;9n����5<M9�<N⋺�����\��jbּ����=$��<{��;��溳�;CŻ< �ʻ���<��๐@Z<ݞڻT���$���3��6��<GwG;���<�2�>��e+�<:Q��w:��t=e����<+�:��;w��Y��<G쎻	�y�i�;�P=C:�Q��s��Q
=�{�;�?����-�H�x�5��+i;ʒ�:�����}��}^�m�<�����7;;-Ƽ&<�iü���p|;=Zw<�ɧ;I���M弓�;�Z�<�G=��v�i
��>=O3�����B<�=,�2[=~��<��$=绪�;�<㛄<�h߼+=��X� �<��<C"���={�}<�/=��;����
%g<y�<�8m<���<����N�;w�9<��	<���L@�<�U�;�M�<*��F���&.��p|=�N=�^<�v��{����:�;]�X<��h�R�=�8t���(�D8<�F�e�=]<�<��h<K����7<I߃<o�%�n�Ǽ��ۼGZ�;U��<����׿�A�仈�»�W��D�=�{��1a�ڞ<�x��$�<3k�V?v<�R<���ټD8��%��o�<� ���p<V����<�3O<!+)�;~B:�'�<�������x$�F����,�̼(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045711
data:
Fsource826
4app/Http/Middleware/SendViewContentToSocialMedia.php(d
I	file_path826
4app/Http/Middleware/SendViewContentToSocialMedia.php(e
5	file_name$2"
 SendViewContentToSocialMedia.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Services\FacebookConversionApiService;
use App\Services\TikTokConversionApiService;
use Illuminate\Support\Facades\Route;

class SendViewContentToSocialMedia
{
    protected $facebookConversionApiService;
    protected $tikTokConversionApiService;

    public function __construct(FacebookConversionApiService $facebookConversionApiService, TikTokConversionApiService $tikTokConversionApiService)
    {
        $this->facebookConversionApiService = $facebookConversionApiService;
        $this->tikTokConversionApiService = $tikTokConversionApiService;
    }

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        // Führe die Anfrage aus und speichere die Antwort
        $response = $next($request);

        function routeNameToPageTitle($routeName) {
            $titles = [
                'price' => 'Pricing',
                'contact.view' => 'Contact',
                'registrar.creator' => 'Registration for Creators',
                'registrar.business' => 'Registration for Businesses',
                'registrar.agency' => 'Registration for Agencies',
            ];
        
            return $titles[$routeName] ?? 'Unbekannte Seite';
        }

        if ($request->routeIs('price', 'contact.view', 'registrar.creator', 'registrar.business', 'registrar.agency')) {
            if (Auth::check()) {
                $user = Auth::user();
                $facebookUserData = [
                    'em' => hash('sha256', $user->email ?? ''),
                    'ph' => isset($user->data->phone_number) ? hash('sha256', preg_replace('/[^0-9]/', '', $user->data->country_code . $user->data->phone_number)) : null,
                    'fn' => hash('sha256', $user->first_name ?? ''),
                    'ln' => hash('sha256', $user->last_name ?? ''),
                ];
                $tikTokEventData = [
                    'email' => hash('sha256', $user->email ?? ''),
                    'phone' => isset($user->data->phone_number) ? hash('sha256', str_replace('+', '', $user->data->country_code) . $user->data->phone_number) : null,
                    'properties' => [
                        'contents' => [
                            [
                                'content_name' => $request->input('title', routeNameToPageTitle(Route::currentRouteName()) ?? config('app.name', 'Creatify')),
                                'content_id' => uniqid('', true),
                            ],
                        ],
                    ],
                ];
            } else { // Für nicht eingeloggte Benutzer
                $facebookUserData = [
                    'em' => null,
                    'ph' => null,
                    'fn' => null,
                    'ln' => null,
                ];
                $tikTokEventData = [
                    'properties' => [
                        'contents' => [
                            [
                                'content_name' => $request->input('title', config('app.name', 'Creatify')),
                                'content_id' => uniqid('', true),
                            ],
                        ],
                    ],
                ];
            }

            $this->facebookConversionApiService->sendEvent('ViewContent', $facebookUserData);
            $this->tikTokConversionApiService->sendEvent('ViewContent', $tikTokEventData);
        }

        return $response;
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�M��p}���=Ͻ�ݱ<R�<g'�����l�d:)��<����ME�����q�Y<��k<$�����y=���<�&�<`�L=��E=K���;`��<~�ڼ��R<2	<z�ڼ>�<VW����8=SL�L�a<sL7�_i=�5�;��ٻD��;}�q�s�=�5�;�H$�Rx=��<sL7���<��I��=����E<�i�FF�< ��u��yà<�P)����/��M��-�:�=�!޼��>�(�=;X`�	�;r.�Hސ�K5(��/=��<˙=�_�<!�L<�ټ��
<�=��>�<���H��;f[0����<7��xrq��"��/w¼�G4<{NI��$��c�
�FF3:[;-#߻%�R�U�=-=߳z<i�A��X?=(�$=]�z��͖=$�S�E<[���8=<1���
<r�ȼ��==�v�ν������<��L����;�(��oN=0�6���<�{�����\}F<���<�f��_����0�k����ܻ��2������<�;?�`�M|V:�c��i�<Yj)=��C<UG�����<3��<����<��<(4j�N��<��^�m���uZ��؝��?�Rx�G�'���λLy���4I��P�<q��;`�Ƽ�7K��Nڼ�3'��w!;�cƼ^�؊��_�=�A<֮4�:�k�	��-t�g'��kJ%���>��7�w�7<[F��`��= ?
=d=�۟<H��Dw<R�V�A�<G�'��R;<1 � �<ѿ�����Q:<�����.���=,�j�M�<�2i=��<2	=�I<�C�u�e�I"�;R�ּ$�i9!BA�o)�<*��=�\<�~y<��:%.��wS<�И�<�C;���=�<r<N��=��=�����
=��G�HV�=���G}x���Dw<��!=ܭ�����t�<�ñ�������
����\�>7컓�<1S=�]<�>�;9�;ɽ-<�fH��_����<�H�<�೼7I=ME�w+C<�j��ǭD<}��<�[A<��<��S���:�����<�=�Ya�ƪ��cF;z
O=��I�����!���{=vl�=ME�����<VJW=o)�� v�<鞙;ӛ�q���52&<R�=���Y�<�[�^o��8�:Xz<���%����;���~�Z<a��<+����<:!=׾=����^�c���=���;ʉ<�@@��9�<c��<j:<<�iJ�Οm;\�<�v�;,��?���<i�G=�ー��^=qO�C3=�儼5����q�>���S~��;WƼ�G;6�ߺ�5<Pʼ�<[F�;��=ME�gk��C�<���<H�a=v�μ�2��P�:���-t�<�Q<)�^<������Z)c<�
Ѽ��*<a�/;���<
B��<�1<��;�8	�Rk�9����
Q�C3�<�5�t@<�˄=��7��X?�h7�<�N�4"=<,���;��;kJ%�ƪ��'u0�c�;0�����}:Ê�;���lMY� ?
�=-<dM;f[�<�oN=U:n<Q��;qI�<��T�tԫ�$ڞ���!<���<C�=e�;ϼ����3�»��`<��;1�<濍:g�$���n�s=��z�:~a�<7���P���=���;��;��<�C�<\��;���<m₼�G�<��1���]<e�<&���Hސ=��9��\=���&�A�
sP��S�<SL���w<�����<s=��	�<PK��O(�-#߼$b:�zU��C=vl	�1�0F=m��N��<��[<�{�;I"�<���;:!��)��fH;b|$=>�w<��=�us<�r<��N�:�k=��<*����*����kJ%��
Q��mn=ӎb=R\<�*�<���1�%�;�	=-왼	�����)�*�:�
Ѽ?�:g'���g��T�=�׭<h�X;�;��	��91S��	�[<Ly"<��J�,���Ά�kJ%��*d��a�=9U,���<k��<`�F���<�>�<e�����<���/wB���ʻq�ٺ��*9`��ڍ@�w��g'=��=��*�<(�����G�p,���;��<�횼�(����<��<C���r�s�1���;�]<m�<��;<��;�����ʉ���W��
<���M�< ?
�D��<���<^o;T�������9�<�*d��L�
�纩d6��
=�!<,";�;UG#<�`��'�;���ʉ:��;�LH=��<؊�#R�;
���g�<�]��#R��z
�<�ޡ���<�/5=�^ü���@T��)DӼ��j��P[<�횼r<N�����l�d<
��7�����=�ʔ;�s;-���~�<�ټ#�$8-�<�$`=+=�ؼ
<�<PKy�Zz�;��=*����(�	�[��`�<���<Rk�<���:(4�;�FD�`�<���d<��O�3c<���<�X?���d�/$=��<��#=��м��<�j�<��}�,=煻׾��y��3'�b|$=�]�<l�<, +�/$<��0z�<�Լ;�HּDw�ƪ��ԫ:��]=IV�}�;�ȴ<7I<���<�g�<�񌻢.<��޼U:��f:���<v�H<	����<J%��:�k�$� �=��cX=��;��<�2i��Pۼ���:������"<:!�;���=W����N=���;�><FF3�qϻ�7�<�K�Bx�)�^��ϼl��]�2���z����)�lZ�<��>����n�<�( �k=�:D&a<���,"=�	��������ǭļM��!����=���;i{�<���;�S�<��Y�?̕��~�;�K�;a��<j~����;m�M�-0���5�<Ê����;�ټ���۝���?P��1�<�{��f�*=~�<D&a<�l:�Fv�U�<�7=�7��#><���;�Ҫ���0<Q�����w������g�FF3=��w<R���C3�<(A=�~�s������:q	<��<�{</3ȼ��輡b�<|Q�<N˼=�=�ۼ���<S7:; ݻ��g�����B <c���=�1�%��;�P)����ٮ��� = ���B�'�*=?�=q���oN;t�
<���׭�dM<�g8��Y<:
<Ji����继ٍ�g^d;�R	=,d��l��[�W8��ͼ�j�<��;�Ȃ<���j~�<�R��
��{��7����ڼ�r?=�g��VJ׼(�$��g�<i{��R�V<2�_�al��1k;
���c�c�=-;�s�<_i�<CK�3����.�}�q�-�;�7;Z)c�[���淼Iֻ6��IּRx<֮��������r�P�"��軖@@��=�<K�-<H�a��!޼�Ѻ<!ǁ<$U޼�
<����_i���I<}*!�k��<ҋ.��~Ǽ��'��(�<�K;
��J%�<��O��j�x;,=�����z#;G":�,=3�B=�s�<�lL<q�;��;j~6=PK�<�y���,<l����<�6=�_�]�/���ӻr�Ȼ�}W��ɻ�<?̕���=�&�i�G��B ��L�FF3��؝<w+C����<
���	��&e�9cH��>�<~�����0������<cH��?м�$�]I5<�e���3<ά�:�g�;b|���wӺ���;(�=���<6B=��5���*�0z�����~�<�Ct<��I��=�<,��<��g�3�B<�<�<��b<�J;�<��;��r��ʻ}*!=)Q�:�'b;�-#�c5=t&<k=�S~��?;��"���꼚L<�w!=	�[�N�߳����d<�O<Qh=.<C�l;�S�;s���
Ѽ�(<D�
<Z)c<�����5��)B<:!��6�<q	=>�,;�ݱ<�oN<�L<q���G<��D��;��;<��<F�<�L<�0%<�J;�<;_%�< ?���c<�+��U�;��;���<��g�W�K�-#�;��e<��C�g'���<Dw<$b���=%!M;B#�;mȻ���6�߼WZ�<�~�:s<*��R\�:ݠ������Z)�<��ռ��[<�\c����<�(��>q<����F<T��<��<���3��Fv=�u���<�#��|�<�᣹��9��<�F���|��c��Ś�<��<6�;
�=�>.=2�;�=X��;R4=��<2Լ�)�< v�;(A��0�+<GΧ<lZ��Bx=�ü	p��R\<L���۝)��$�;f�*=qI�<��;�����(=!�L=v�N:VW�t�<J�D�al;�s��8��*�t��r��=�j=FF�<&e�;`��0z�<kJ�<��<;�T=�9+��q��ɽ�<_�;��\���<#��;��<`�=�E�:�u������Rx=e�;SL=@Gռ�Ƣ�h�X<���<���/w»\}�<�u�;���;6�_��䥻V�VW�L��om+<*���<�( <l����b�<��=&��<��R��˶�J�Ļwo�:'16�
�g<�BR�E6ʼ�d����<tԫ�b����{E<�]����<<�<������T=�mn:��<^Y����<��Z�W�˼j:<=������;w�7���l�'u0�7ʃ�.�<�
��r��9���<@G�;cH�<����=D�<@GU=lZ�֮���?<^o9���<m�<	=%��<�f�<Q[����<������~n<����xr�;�( ��Ya=N�<�;o;�HV���@���;���S7���䥼�M�<�{�P�<���)D�;"�5���<�T=�Y�;�&�;��!<Ê>�_�;�FD<�@�<^��bE���@���9��ȴ<[�W<��<x;��м��;$��)
<��,���\��!�Hސ��";PX�<�ٍ�����$.=ڍ@�u�弽�`;�*d��!,<��<`��Y�n���<�$`�������0<0��;�}�<)
:��<HV=u�;��<�:�cX<�����$���;�,3����<s�����R��6��$U޼�j�;��`����<L��(4�;#Eu�۝���
Q�i��<�Ix<��<�%=C3����<�'<SL�p9=�u�˼���<���<��"0;�����1�4"�<k=�(���˙�#���X&�<Z)�;@�=��;��<�(=�pp���@<��J�]�z�s��mȼy��;��޼�騻{�üY���2����$����Rx<�\��,�S̼�7K;��<�<]I���W�n�<?�p,e�b8�<�z����� vR<s�;~=��<U�b��H���[�<�d�����<%�Ҽ�����<�����Y/<�3��=Bx<�=Rx=�a�[��<�*d����g'��q��^Y��,��<p,��H�<��u<�g�<���<��%=ϼ=J�D=��#�;��:�ߑ�$b;}���7����t<š;u�<��w���;B�:q�<��$=)DS;yK<\}ƻc�<���&@�*�ͻ<�C�<.��<o)1�����^;��<K�-:[��<SL��N<-�<���<�t�<#E��3��;W߀<��$���Ǽ�/=׾<�B �ʉ��g��<���ҋ.�AW>�Yj�<�Լ<�E"�P��;�h(�k=p�o|<���;�T<�����lL��Q<Pʻ񠫼�5��Đ<�ɼ[F��><]I5��;M������W�5�+<��{�vl	��D��R��O�9�Aļ,v<��<�׼�i�<���<��="����;�A�<��;��@:,�;���;�o���@r��s�<��<D��<�ٍ<f�(�$��o�;ǭD<;e�;���:���;�⓼o�%�q�<��<=-��E=!ǁ�-t��f�@��;{�ü�Ct<V���S�<�i�h7��X�:�L���͖<�l̻_X�챶<�=�j<=48<NK<t�3c���<���;W߀;��8��y3;8�7=��;��G�<�~Ǽ觹���<ϯV<=-;u�=�ɺ��<�׭��r?<���8���;��0<��<����<�+<���:�����o<,d%���<��"=�R��5��;-#_�lMټBg�;�k*��,;(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045712
data:
3source%2#
!app/Http/Middleware/SetLocale.php(d
6	file_path%2#
!app/Http/Middleware/SetLocale.php(e
"	file_name2

SetLocale.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class SetLocale
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        $locale = $request->locale;

        // Überprüfen Sie, ob das Locale-Verzeichnis in den Sprachressourcen existiert.
        if (!array_key_exists($locale, config('app.locales'))) {
            $locale = 'pt_BR'; // Standardwert, wenn das Locale ungültig ist.
        }

        app()->setLocale($locale);

        return $next($request);
    }
}(h
pk

	����̷��(i
�0evector"�0��0
�0�����{<�`f��R;<{�$=q�����;7�¼��D<`�8�c~��^	{���X�T=�,���f���=�yG=��@<�w2=�0U=�uh��ˌ���:�	��}��h+�;�n_=X�T<�����^;R��;���;�w�<º;��<�<�'���5b;��c�*0��\�����<�p)�$�м����k� ��< ��Z
(�
V�<�[�o-�E���?�Ѽ7����!�m�<qd�<�+��X<b�L�V�=$��;�)<�k�<8@�	h����<�I�<�;�������q���^	�:|�#=x<��=*v6���=;i	����9l��N\�s��<�E׺X��<���=�{����1;�WH=����Ҽq�<#��<�k�<� ����:$��<	ﹼ_%$=�w��^�<g&	���%=
�a���<�@�<�<��;W��I"�<"��;�Y]�C�N��,v;��=ס�.d^=t`����<�`�<���������)L��g���%=�ہ:�Й;Q�<j�q<���nټ$�%��S=�Y�<E�b��������c=G�v�V;V=��<�N����l;=�=�lE<���<!�'=V�@�E��xe���
;��P���ɼ_8<ֿ<y���{)�;��=$�{<,{u��>�<lE���<p��<	�ȑ*�Р:�)<�������;�;-�4=&T�)�=��=�uh<y��<E&"��.Y;����O�Z<2��0�	ﹼ����������<]�;&+z<E�7�M'=$�P���ļ�`���`M�$��<6I=���b<���<\<��s���k���\n<�p�<��<ATл�)L=lE<�q=��$�-�	�V;V�Wޔ<�W�<@&=��_=V;ֻy��<�T�\�|=��Dt��l�}��;��<J�8@�.�H=�0�<W1��5�����J�;Un��f;*��<8N����<H��9
�;�Pػ�����9���ϼ.�ȼ�k5=�K��R�C�G�˼���<b�̼n5��F<���
�a:	�<X$?==�}�1?����< ��<^��<,{u<a�"�6ޭ;�Y]=�n߼���;)�=A��p<��=b�L��R;��9�<d��<�ٷ��	�<;�j��I�<�Y�<m�;tl;5�0���y@���⼻6ɺO���n{ü�W;�@1=&�<��A��5b�$��:s�*=�l����:\���;-�	<�����G:�ꑑ;��)<��V���5��<����(=����IJ<v|(;	�9<�۹��� T鼪9A<�K����2��<� G<�����㡻��=���={�z;��"��=}��<G� ���ʼ�nx�5��<�Nu��=Z��;2<n{C���-=�[�<(�
�Q��IG
��y=�\�"=�;u��<�%���Nu��i=�%�y�;�s�U�4n��/H<h+H<���w-����<���;�۳��᥼�<�];#g&�pr׼3�E�h�;��ؼ�EW<�X-<A��;���;H�<�9�=���Nm1�M'�=��<X�T�5�w;==�u�;IJ<�K2=�,��=�{����,�����l<����,�<�)3<Р�:/ϝ<����w2=��<�['<V-��7�B<�k5=~��=��W<\<;��i����󉊼�"C<���<We��X���$=���;M`;�YD<�{*=rik���d����;�Q�<~���g�<��0=�L<��=G��<	���r�ı-:�Wȼ�K2=�%�=Yը<���%P=��P�X2�<��=d�
<Q�n=&�9<YN�<��i=��J<�S=�N�<wIh=��<㺀���%P�<����׻<"�<�Yը�Ԁ7��"�v�}=�=j��<��<�û=�;�W/=}X��񁼻�4��0<=�|�<�Pq���1���_�ǯ=�0�:���=��
�{�O���r����<�p)���ջATP�����\��]��� �<�<�����+/����s[@;�@�<�P�<
���`����<��P��+<�S�<l>� ��?֦�}N=��D�s��<Р����<��:��4={
��/ϝ�,��<��<<�Z�<'��?֦�����~�6�K�<{�O�o�-<_8=V-��p���I6��Y���J���h�c!<�⊻�B�9��(;?�;p��y��<�=kL��=t�:�&���<��<��;�^�;��<������O<Un�;����;��<�K=v�<zՏ<\�|���,=�@c��Nu�W������M�ƻ���=,�߻Z)����;}?�i	�zՏ<(�x<�B��+h�dĵ<��M�E&"�Z
(=��<a�����<*v�<w�'<�>=��<7�=�]�<�鬼@�=��;�s�<�y����U���<O�Z�A�=���<��<Z)���q'=I�4����<�;f44<(���%P�=��J;8@<nټ��l<H�:��a<M�F�h+H;E�b<�^��<�'P<��Լ��;M`��C+=h+H<n{C<�����5b<�B<�;
d�����;�x�V�@<-_<
"<Q����<�q����	=N_�<7�<�һ�	��+�W��ʻ}�;��<����<^��<;�~<��a�9�q�!=}N��A/<�+/;z\�<�'�<} �;�b�<$�P���:=���;��<+� <�#�;7�C����r��0�ܼE4M<6ɼfA��u�P�<?�|<;��;v|(��b�<���<@��}<�����<���;���<wI�<�^�&O����;�ʻSw<�Ҽ��<��;K��<�.r<�S=Sw�G�<r���(���M'�<6W��9A<��{� T���:^�ϻ�3��Q
={�ϻ������[=g&�:
�=��Р:<��<�{*=���<=t�< �S���t�.���\}���_={���,{u���p��R"�O�<�9(=F<�YD=�WH;�Z����B<H�;?k�;(<a��C/�}�����;��o�X$��V;ּ��=nٻ��y<G6<	�;f���z�zՏ<��<��<�Iϼ�Y]�t`�;���<����{*����;�;$=ƚ�����<�	��9l�wIh<C�y�f44�藼���;(����;�� <z\%<ı-<S���N\;�ܘ�Z�=�;�<	���޼{�O�B���,{u<^t:�������O�Z=�R���Z�K��X��<=���Nm1��@c=����6I<^�ϼ�w��,�<�
=���;���<�⊹��޼����?��[����v|��=�����Ӽ���#�<C�����m���3D[������pB���<Ab{�Pݯ<B�=��*���*�K^<�q��9��<�a=���
d���{*<	�9���<��ռ�(�;}#���Y������K��ɩ<bF�<5����@:�l�q�<�pt��)��<W��<Ab{�=tS;�yG��=T�����sM�;9��;�nƻC=9�T���dĵ��=]պ$񼑳���B�<�'9��	��A�=Z
�����;� �<�ڜ��I�;�)9$��E׹mc<�,=2�="=R<�䆻'�=��=�%�:���@ʼSRm=��4;ﻘ;�:�
=0<��9;3��<i	=^t:<��l<��d��썽`kμT�W�s[�;�u;�م<h9�;K�2;�P�;�2�<*v���c<��'<�J�b�!=�go<��;�J���;�r>=숥�y��<�a<fB߼{��<\����Ӽ�K���YD��nF�}X�-ݼw;���B<�gV��Nu<�x�:��:�@��%�<d=�����dK�<₁<��;�뼿�\�ri����� F><��=���r����;B~$�qd,;*�K<��ʼ���;�=�B�:���;�ͻ�nx<���р=h���ÇY<�3��6I���<H!=!��<6W�1?���B;�I6���;g&�<�W/�$q�p�<Q�<��<wI輵[�<�W�<=�=<h+�<�w<�GS<G���r%��k�<lŚ�}N=n{úɒ<*0�<b��<�N�9`kμh+Ȼ��<[E�;���:��5�nټР�<��ʻ=�h<�����0�?��<�T�;�EW�,�߼$&;=
�<��%;	vO�p���n�<�ǭ<���<Aͺ��\�<�c�AT�<�w2����<�"�;�w�<�W/;3�E����>g<�]�K�ȻK�2=�d�r��<�2��)�;�=��A�7<AF%=].=����{��ه<�;����6�	b<�K�;��;0�YN=�=��<=H���h��/�<�d������%�;�3�X$�;G��;�k����;�e�9�ԑ���<�)=�簼�Nu<������;�ռ1MG<j��<�7,�������b=�@1<���v���\<<ѻL�=����t��;t`�w�Ҽ�x0�F^!=7.����n{ü�p»f����8��@�;�ٷ<PV��C�y�7�B<�ֻR?=�	�<�R��f�ɼ{)�<�pۻj1<-洼G�˺$��;a��<`]#<0�<�����<�ļ F��V�<�8=�3��"���=�Z�������D��0�<��<�'P�~<��qݖ<��o� Ti��"C;w;�<�i9<�� F>=tl<bb�<��1���2�-�<�n_�j"�;_%$<=k=��E<"�g<*0�dY�;�k��=�s�U<�[�p�]U�\�Q<�C�;����6W=h9��/<0����<�w2:d������+h=�N�:��:��<�w���<p�;R���['=h9s���<����|<����ɐ��\�*v6:�yG;Л;�n_�/V�<ѥ�;H�;����D��Ly�K>�₁<��%<�(�ZӼ�	��xe��j�F<�`漠�^;$q<������!<�h�<0��"��<�Z��IJ���<Z�=< ��<���;���4`<��<=��<*�!�G�˻?��<q���[';h�������%=����䟼 F���� �S�x�;�'P��Yݻd��<G�<�3�ް����S<&�<���<<=�h=qd,��^Q9�`<p=���<��G;� `��C�<M{\=����9Z;�d��?�;��<��D;�۳<�ͻ 8�M{\;;o���B<I�����;�ʎ<��<��=d�`;����0�E��`kN=��f�����W�����A��;����w}<y�;<�z,�].<!����Ǽ�~m<�Y�<�9�<�H��?]�<��ͼn�.�y2Q<�wd���<�7�<s�U<\�<����4;��@<�B-;��T6<�G��T�׼;o��9A�V��<\��G=󉊼���<G�=��R�4`=�<*���8*<�4��\�������><K��<;o�;�Y�<,��<�W<�/<l��<�<��<� ����@���*v�����<Z��<��$��˺�i ��)�;�⼻R��<��=���;���<?5<h��;�W��j����`=�J<��<(c��鬼y�;<�s�<���;(��<O���#g�����<"�<CKd=`y��$��<��F� �S���t�0<���<7$ؼ�`=��;IG��9�4<�s�<Z�<�b����6��Pq�X2�;���<J<�Ł<�uh;����y�<d�5� �S�7$�;�l��	�t*��@J�h��<���;�t�<޾�;	�z<O�<a�"��q��bT�;����=8�<�.r���1�{
��1�<��μ�Ue;"=R:.�H<q;�U�;�N�;�w�E&��36��y�;=��2<Dg�����;�u�<Q����1M�9�k����P�}N��D�=�~<�9Z�N���5=�@;�'�[��u˾<���,{u<.�s<���<*0�2��<A��;��q�
Z=Z�=�\�=A�e<'G#:��<�B�<�C�<��7:YN����7� T�����I;��=}}���Q$��'i<�K�T6<��<��<���;��,<zՏ:�T=�i���<l>��z:E����:X�T=.��<G׋<Ϯ�ZS<B����ԼK�2;ް/�TD�;1���޾Z�s[��"�g�(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045713
data:
9source+2)
'app/Http/Middleware/TrackUserSource.php(d
<	file_path+2)
'app/Http/Middleware/TrackUserSource.php(e
(	file_name2
TrackUserSource.php(f
	file_type2
.php(g
�text�
2�
�
<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class TrackUserSource
{
    /**
     * Handle an incoming request.
     *
     * @param  \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response)  $next
     */
    public function handle(Request $request, Closure $next): Response
    {
        // Manual Tracking: Checking for query parameters 'partner', 'campaign' or 'utm_source' and storing them in the session
        if ($request->has('partner')) {
            $source = $request->query('partner');
            $request->session()->put('user_source', $source);
        } elseif ($request->has('campaign')) {
            $source = $request->query('campaign');
            $request->session()->put('user_source', $source);
        } elseif ($request->has('utm_source')) {
            $source = $request->query('utm_source');
            $request->session()->put('user_source', $source);
        } elseif (!$request->session()->has('user_source')) {
            // Automatic Tracking: Checking for the referrer and storing it in the session
            $referrer = $request->headers->get('referer');
            if ($referrer) {
                $parsedUrl = parse_url($referrer);
                $host = $parsedUrl['host'] ?? 'direct';
                $host = str_replace('www.', '', $host); // Remove www. from the host if it exists
                if ($host === 'creatify.com.br') {
                    $host = 'direct'; // Set host to 'direct' if it's 'creatify.com.br'
                }
            } else {
                $host = 'direct';
            }
            $request->session()->put('user_source', $host);
        }

        return $next($request);
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0��3�n��<�o��!����<Ɨr����9��<H�k����dh��z�Z�Ҹ=t���Li,��G\=�N3=�EF�L��<�ȸ<�Ú<�6��:���ٻ�ꁼ�g��iV`��Ѽ��5�֬"<��x��F8<JmX;��8=�2O�Li�;U��<�# �`3=]z��,���<�/�<<V��kM�r>v�Nl<�?<���<]=^x)<�z8�_�]<xo<��E�:��;��<n=
μo���R߼԰�<����3/<�6<�엻��8����<C=��=��a< ������<�M=q��L��<H��<�<��$����`�;v�6���\�/N����6f���4��'�;-�U����;C�=	����=;�J<XǛ���H�R���;2���?h<���/=a1���?����2��{�<h��kM<ת�<�W��(��c��;
�<��<��b���S=�c<(K2=o�#�e!�;-��<b�;O���Tü{(��懼ebU�s�.���a��<�Fj;�3��>˼����c��<��<��l��5����<#ۋ<n�9��N3;�@�<��Լ]9غ&O޼�X<�=�@(�;T���WҼ�$D�$�����<<V�i�.=���;��3�����м*=�3�;�ź-='�rB��g��9ޓ<D�`������:�[A����Ƽ%�:kR4<N�J�6������K�)=��@<�-��&Ѭ<�43��P�2V�(�|;���Bw<Bē��5W<�<���5W=kR4</xۼu84<�f��$<ݜ��q��8����_<�N�=�<]�
��:C��/�<~�<cj���J0�=�%6=H4�<�t�< "5=ߔ8�vs�<꺻����s}�<H��ŝ%��j=�{=�;ݘd<��K=
�f=��A��u�&���~�<t{�<��S��zj�t�=r�<���<����;�����:~�e���o=:�<e��;"l�b�<=Pм��m�ZC7=�Y6=���;�y�<���<��_;������<k�e��t�;^7�<N �<(�c�Is�<1�`=��ֻ"켵I�<��o<��{=��=�3��s��<�<)<>Ј�0��;�Lz=F<�<儗�/xۼ-~;3p��u̻�� =�zj;��(�����Fj=��m=�����ˍ=�`
�Li,���<>Ј<�ᔼ��K�>N:�F��<�ۄ<٤Y�Q[!=*G����K=�{�Yf=ŝ%�=�l����^�~����ܼ��\=۠�;h,�vsh=��d'!=�%����I=�>D�*�мݘ�g^)� �漯��<����P]�:ݘ��m<9�;k�e�s���G\<�߼���anJ�2�J=k�e<_rv�T�s�;2���a�F��<�
v�	!û~���T����-��:��l�����9^<��>�Yf<&O�<�o�7�u̼�<<H�R�%�;�
ļ�B��
v<D}y=£��#}�UO�;��l<W
���W��)�;R$����pȍ�t��kԂ�XǛ<��<nJk<�r�;��3=<�
=��<��%�UE=}���e�<�������.#=��;R�<=ݘ�:-~�=���<鹉<��3���<h\�7`�K����WҺZ�<����e䣷T�)=wi=�b�<�^T��|N=L��;�
D<���;(
�<물�����;-�PP��ͫ�B�,<,����&�-��<԰N����<BD[��r��G�=�V�<s�.�������<�F=;2�5��<�K�;s����t:t:ʼ1��<;2=a�1�fV�L(E<r]<���;RY�<=Ҟ�YE�<[~k<:���: c�����<�ԭ<]z�<��;<(��l����z<�2�<�@���׼?�n��0�<�nu<=Ҟ=�%�	��<��b<�`8�x.�<b+�;�����_��ż+�<m
!<������=G����=�ɪ<$�<;����<�q�t{1<Nl=�#R�R$��u���<�R_����<fֻ�!�<����r����x=�3<�$�s�.=��l<e��t�⼰���'<I��ܼ+�:���(=��_��<�������c�h�.*���ּy,?����;e!n�P��<к�kR4�9����F�<ym�<-�U�ʋ}=��A<�A̼�X��
̼<V��H�Ҽ�KݼT[:Q��<�r<�H#<�:u</�B�]��\�#<�(��F꼪$D���<,?=<L�<�)�� ���4잼7�ؼ|"�(�|��+Ƽ�=�m<iy����<��\;�o<�3��d9�=PP��#�<����%=h\<�SQ<�LO�������%U�<�O���߻5'S����<l���	�[���<���<(��a�{<z<�WR;1����u<��<�`�<�H�;��<�y�;�`�;(K2<;T��5ꈼ1t/���C=?�=_rv<�J9<�ܻ�;;�b�;]���z��X����=rB=�䜺s���e+=��;���<�� �m
�<@J=*���Q�<
V5��c��wi�>�!����<s���w4�����B���;��\<~_�<��o<鹉��:�I�9i�<�L���(p�gH<�ܨ<c��;����EƼh\�!a��S&���Ӽi�G<q�<����+ƻZC7=Li��|"��%�<��˼-�<�ܻ*�P=R���;��=�K]<c�O���L�/�)=���<=��T<�5����;�z8�q'=�ӻ<=P�<����JmX�����3:�C��u�L<G��<���<_�]:��:]9�;�׼ݜ=r�D�Ne�:��<	�ۼ�����Ex<��^<�h�CBE���<.*=�)��_�]��]b<;�㼰W ��%����=�K�
�漀�9�t�<k�;_v���ͫ:�l<L���pټ���<�P�<��j<��<ʋ�;WK=��=�7����6��h�<n�Ҽ��_<�׊�t{���o
=�Tû2����s�<
V5�&w�&a=�#R< ��<?�n=������$W���<��<�懻g��;�S���<1��<��
��Ƣ9�׻N$=ת�<Is=��<Nac��n<4-<YE�<�W ��;����W�ծ8=�)b�Nl����R�<��<-=��c)7=z;i�F�~�<�4<����0��i�Ǽ+����;�ͫ������WR;�*T�l����A�:̇Ѽn�ҼjT�<\�<��+F�?��<�S�:5��<n�9<�`
��~<�¨<X���L������<5�k;�G\<��b����R<�T�;oʣ��H;��<n��<�P=�Wһ��ἤuL�*���]�<lP����W�f��<L���"ݡ;�G\;�:t�b<��<�����Y<ޖN�&�<CBżWIy<���<�$����m����<r,���>��=���=P�<��=�8�8KkB=s}G��EƼb����&O޺4�7��Q<����6����黓��;�b�<�:u;zgs�z*)=S�&=�
=#��<k������<3�ͼ�w0��!�=���a1��:�;����ɼ��⺞H�;Ҵ�����<��=<̇Q��iW< �<����X˺���$�=���<�K]<	�[<���}@����<�F�;'�/�_��<��<�C<��<x.ռ	b��к�٤ٻ�ۼMg�<<�1�`<�U��!�7<Y��<%*<&��/�:W
�c�����"[Ӽ��=�L���G<c�h=��������cr�$�q;�\p<��_v�g�s<	�<�;�v>=(�:ZC7<���;��Ƽ��=���;Bw<|"`��#R9-~�;���g���
V5<����?���]�l��b�<���<%�;�治�h=WK�ʋ��T�<FyM<<=!a�|�x��Wһe�<��<���<TQB�5��<?�n<+�<#ۋ<��;pF?����<��;�u=�l���<o�#<���8c)�<pF?=�}:v�;-������/�;5�<��߼��ܼJmX;�H<�".<ȓ�<kR�:��<ʋ���n�<%U�N$�<�ܻ��}�F��!a�<��;��<���;TQB�v6�;'ϖ;R�U�b��<�w��Y�<R��<��i�����ᔼ��6����<��<N$�<��������z
=�Y�<���<a1�uy< c��褼��u<���G��;��<pȍ��>�;7`q�j�<�Q�<��0�R�<=�O�<�<bl��
������A<K���e�<N�;��K�^7�<��7�X<�5�;�Y6��X=�җ���T<H�=�\<���Y��<@J<���x�m�[�R���ּ̇ѻ�:C�ܞ��������6�Fy�<��<�k;<�= ��Ё��ľ<�̇=��
�	Y<��;�;��%<�pY8~��<;�<�(����;�=��<y,?<�����Ȼ�l�;)��mN;mN�����v6<Is����<N�J�ܞ<�C�:�H�<�-�$��<��S<0�,�9\E���=Q[!��M���Ƽ3p���7�Ne�<(������n��<Դ<��߻H�;��<�yx<T��WI���)b:�43���L:Q�<~4���<	��:�;�;��<s}G=��T<��}<1���5<�����Ƽ��=Ɨ�;�e+��G\�3E��<�	<_rv�'�=�# <gH����<T�;=PP<�R��	��<ᐌ;�<&Ѭ�g^��5�<���]9�;&�E=�'���<X�J�&�żf�;�U
<a-�M&/�y�
��Ű:E����A=���;H��VM=�����dd<�����YŅ���;ݘ会P{<6�<b��<>K���἞<=�#Ҽ��A���<��{�g��<�f�<3��<�R_���:�jɼˍ�����<�$=iy<n����;��"<�HN:]��:�ڻ�<.��缿)�<���t��5�k�9޼I�<=PP�a-c�Ne�<6f�<�����V�<�޾�ˍ�<�WR��;��ܼ�*T;��<��9=�:u�&�<3�4=P��)I��S��l;}a1���_�������0���4-������r]�a��;Z��:��<A�¼�+�<��;t�b�ߔ�7����<��><�`�;-=�<��<�3��_F<�s�<k�e<anJ<֬"���ܼ{(�<H4:=r]�?L$���m�@�?�X�<P�:��(<ʋ}<7��S�&=��0��Y6=ݘd��
<I2�<�g�:�����W�R��Fyͼ�}�<^x)=��3�=�7<T[��R߼���<n�����<�<�U�<z���1�y�����~[�<��w<	�ۼ�F��d�<��%�h\���ü|����ӻ���;F8�<UO,=�
�<�?�4�;O"�=��[A��Ӷ�\�<���;3p�<΃%��\p��>���~9;�{*<�&=N ��<5=E��;XK�VM�������:;��<?�ջ�3s=kͼW�`��K+<�<<�K;��8=��+��׊��ü�Ӊ<��ټ�����i׻���<;����G\<#���	�����A=�|<����b+M;�Z(=~��|���5׼�����=���]9�< ��0��<q�=���<
��<�q =n��ȼxo<�3l�ݜ=e����<Ne=��W<zg��X�<�ﻅK]�R��8N�1=RU��5��a1�2r��*G�<��<J�<�ɻ@	'�(
�<΃%<�I<�9&<�o�����9��~�e�e2���<5h:��m��H#��������<�P�;-~<�)�<5�!=���<p�𻵆߼�)����7d��=Ҟ; c�<�̇��:���Qm;WK=H�R�Y�;�<�7<R��<��Ѽʋ���̇<�~�! <�'�;7�X<��2<����^T��!���l�Bw<�\;���
`=̎:���&O�<��=g�Z=d'!<ܞ�<�}@�:Z/=�y�<k��<e���^��<RY�<�:�N�;Ne�a�1=Nac��dd��֑<n<���&O�<[��;��a;t���.�;��˼Hu!���@��N�;"�:�����<�(𼸀�<���;R�U�E>���<z�Z�0��<=����
=J,q�p�
�d'���C����r<����}:��(��AL:�}<h�Ļ���;����y�;e!����� ���O��ݼ(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045714
data:
5source'2%
#app/Http/Middleware/TrimStrings.php(d
8	file_path'2%
#app/Http/Middleware/TrimStrings.php(e
$	file_name2
TrimStrings.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;

class TrimStrings extends Middleware
{
    /**
     * The names of the attributes that should not be trimmed.
     *
     * @var array<int, string>
     */
    protected $except = [
        'current_password',
        'password',
        'password_confirmation',
    ];
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�9'�h��<�����EI�qs�����.�X�&=W����ֺ�u��h.g�9ͺx
"=�J����<=1W=�E�=H��?��= �(=�C<+0�Ʊ�;D�N�)��<�^T���h<�1�=�
�<fx�<Գ:]}�<��ܺ��=Ӳ=���<��<h�1<)���OV��3�xW��dJ�����܃=c�<���<l�N<hxL�l~<�<ظ�r
=Z�j�l���u@�����<:=����Y���m�Q'<z
�Zx��燻+�J��y����<�u�<S`=�8��$�����:�<?H�e?=aެ<8d��@�1��8�;��/=
�'�l�v�+�����b=خ��s�<D�&����<�
==1׼=�ɼs)a��BY�s�S�TO$<�g:$��G.������Vq��+��hxL���;o켭��;V�M����OV=�1D��d!��=�<+�K�S=ɷ�<��;�=O�<�G��'t =OZ;��}?;�c��K���~�u<��Q���)=�Y;"���<��=��=�&q�0�=��L=�Le<�t�<�p����q�<��x����<���<6�<���ԡ�Z��<����=�Ya;F=��9S��=l4��m<o:�=V���Ơּ�|���8��'��:'�ջ�ѝ<��y�Dp�;e��<s���8d���U����A�
�<�G߼l�μ�e,<h��<�Yμ����<';c=�
�;Ʊ��=j��u儽ݾ��m����c��ԼsY=)�=	a�<I������<~�%=V�2��ջ�o����ݻ=�I<#����<�8�;�+=�'8���n=�^����H,Q�wy�<��$=oK);�8`<�S=<�]=�>-=�j2=~��~��<D�&���$<�YN;��~=2��H,Q��<�6�<�E=�uɼ�m�<΢;�N<z�X�O�p��=-i	�4���zW�;��;4��'��<�g=ڧ�<̈́[<q)����;'�}<R�ؼ
?�@Yt�ϛ=�r<�M<�z���௼�"<�H&<hx�;R8s<s��<V��j2�ä́;=��<9dG=���:�c�<�κ��=d�;\�<����:]3��\���h�0ۋ<x�=9S�z�;��Q'��^�:(%:|ɉ���K<�؈<=��<���<cr;<�0j��9=�	���c�<��V��B�<y����&��
�<���q)�<���;��<�ȯ��W�;�%�]�<�wr�c<K|�ݾ��VO�
?����h��R2�f.��.@;d�d�zF#='���;�F�ca�������|�<��c��<�h;M�,��ռ�Լ��;���@<4^6�o�<�<���.=\"<&�=׼'�}���Ѽ��@����<�8��%"��X���w�O�=hg$������+�ʼ��i�?�=�ږ=KCF���`�9b=�L�;�g�<�.Լъ(;2�O=�>�<Zfݻ��y����;hxL�Uȼ=�ɼ���:��������y����=x
"=�t>�D_�<��;��=O�H;KC�<q)�<6᜻o�=�==��:=|5�<O�;KCF<ǆ;�1�<o�=	�3=������ۖ�<+�=��0����<�"=S`�V<�=%�< 
y<��P�\ =z��;�<#�<ɷK=K�S�]"E��Z��G�<�Lx=fx�=1׼ 5��$]�<Qݡ�~�%��R���8�� ��Ϭ4=��D_A���n<�����_��}�=�o|;�=Ӽ��Ҽz����]�a�﻿�)=J����);�}?<������+伩Z�<<6<*���=��;���;��=�=�t�<���<_����u��n\
=+��<0�&<������;Q'=˕?�s�=h�Y=
?�:�3�<�G�<'���+���I��0&=a�o��u<_�;�	��Ӳ�)���>F,
��<.�:��#=��S�$�;$$n�xh/�h?���L���S=��׼4)��鼻[w<����������<j�2=ss�<';�.�;aJ�;$9'�U��缓	'�9b��9'�9��<7�8��a=l���4^��9�|��;�;z�X<�<�h�1=s����GߺZ�j��L�hx�:4�=z�0����<�l�<���;H
��j���)
<�3�<���T���=��;H)=��;M��<̈́�<����;OV<�1ļh�	�z�X��
�<�����ϻ�3Z���y<�*����<|$�<��
�����s3<D�v����;a�G<��ƻZf]=K�����@��!�:��S=���%"��-�<�%��|�|$�����@C��j���6J<�����B=�f�D�κ��=Z�<l��͗<)c�<�^��'*�:��<s9<˕�:�7=���<��<z�X�qΏ���<��.T���ͻ��=�jv<h�t<nm5<���<��;���;V<��Ѽ�S�0�3<
��<6<*<�����m"<]l��;�-=��x_�s��ظ�|�	<-i�<.6�6�=蹝�ݾ��@�<��@<s�n�vQ~<e�<<������<���;]�z9�ԍ<���� ��<v��F=5���c�'ϭ:�;�c�@i<�&-=�߻x��7и<�M��M!:=H��;"�S#<
Pº
PB��	��H�k���ۧr�"=.�Z�K�Ӽo:=�2�����_�<�s�<]�z=Q	:��+���5������;��j���H&�j�=�}?��.�9	:�v@V�;օ��z�<T�=��<Okc<�⁼�ޙ<��E��혼ؐ�<�����F=�O=�@ü��n; ��<h����D��F�;�J=��]=\"=D\;'*;���5:�T�<Ϭ4���/;Mk��%�,;��;�V�;qs�����~$[��uɼa��R8s9�'=��<o�<܅��oļ�M?;��<6�_��H��ZD���Z(��<��;Zf]�Z�<sY�';c����;�.�9	�7и<��:=�
S�ʦ�<�����k<��: ��;�rl<���<������2�j<Z�<W����;�Rż~$[=���;�=<�-���<��\���;��}<T��<�'�<;� �S��;Zй�&�VO�;Z�B����<]��<h.�;���<4�=D_A��>-�ı:�Z�'�������y������2���λZf]<��ݼ����;�Х�X��z�ؼ��=={<���$��
:|$��w��:�y�=zWK�.6<ۖJ=Z�j�ol��jv��EI=V�ͼHe�=��06���C�<�C�<�v<�<
5��Х�q߷;�a�;��F����]�_�~��;�����sٻ�B�9���]Ƿ;蹝�s)�<�!뼿r켲���"=v�c<�1����[=�J�<ъ�<�0��B&�<u�,�E+=߭�<�⁼l��;�*(;ٹ�'�<n�
�O�OּJ��������d4� �P<ъ(�\3�<�=�9dǻ���;+A�<�`}����<��@<He�<�v�T��]"E<��F�Z���lE\=�N���/�<n��<��<Z��u�<O��;f�0<��ֺ�=o\�<�zb�eP/:.�Z<��;��S��T�<��*<9�|�s�Ӽ_����ʁ��z�<~$[;��;��;�
�<��@���
c<�C�H
<\d�Z�꼁Ϛ�_J�;�<��;�&�<��Ѽ.�;O!�;�=��<dr��_��<Sq0=�[�� �C<]}R���*���ݼhg�<�:v<a��<a9:<"ɜ<
]���߆����<�1D;$]+=�������b<;�-:ca���V��K�S�~n���6J��U"����嵻-z�<�G�;dr:�2�<�c�8�2�lE\;���<;�-;Ơּ)�<9	�;��
=��Z�'��8�';c���(���4=�$�= /���<oK)=��M=�
S<2�ϼqs<�%"��,>=���<��3��9	�<nm�<��5=w�;���~���)�K|��P=2���`�;T?����;
��;怜:_�<�z=�$������<$$n<��|<�EI;h±<T����T;�=���<Ѭx�Zx:'��<A7���ˌ<���<�\><��<��<�ߤ��o|���׻�2�a��� �<h�t��=���=TO�<8d�=�}?=	��<��k<S#��o��Y
<�6ʹ�i�<�D����<xü<6��9��;\}���j�<�0}��w�<�|;�p<H
=��<�8<��=o:�ږ�6��<��］r���G�<T�1���=�5,<zW�<o�<a<�������<4�;n\
����� 
y<�A�6᜼�Eɼ������;n�<�ٻ�2�<�|�;�f����W���Q�<�F��9��<���9�ټ������)��?8<��;��ż.iM=v�p��b<u���wy����M;R��
��<��0�KTn��pC:V>�;ݾ#��U����;Qݡ��$�;��R����a�;�f�h��<�(<���==�N��-վ��l�=��;+�e<�;������@C;_J;-�<q):�����ڼD�N���;I�7;��x:u��<"�;|$<2�B;)��<ߜ�������M=܅"��a�<�k���8<�s3�|$�����X4�.軕�������;�0�:�YN�
�O<O�H��Y�<�u�<a�<�jv����&��<.��;06�</���z�=��;)c<���
=�8;s�n��6�<~3��j2�s�<��=B�V-�<�ռO���9M��Q'=/��<�~�h�Y;��
���D\<��t�����s)a�Q��z��<�s�;
]� ��<�^#�]Ƿ<��軴��<
��<�<a�T<q�=�+d;�=�uQ:<�^Ժ����fx=�U<8��F��;�1�<���<V>@���aJ�;�D�λ��
�D��;"n��O������<��F� W^<�Vq<H
=a�G�.�:��L;���<Ġ����hg$<���<n�<�=�켐�t����F=5��n��qs�Qݡ:$]����ݺ�G�2�B�=�!<�<���<�j��K��;��c;e��<�R���/=z
�<�&^=�l���Q�vQ��[=���<Q�!=a�G;Z��UH�$���	;:�<���X<�r�<�8`<Xf�����f��8��@�f=��<9���w/�������@ú����4Ǽ�Q�9�Le�)�!;�b�<S�<��VҊ:���;����<�Z��)�<�U;|5��܅�<e����c����<m=\}��~,8s)��q=�T�<'t �\ ;����U:D�v�oD��v#��=�<�7�Dp�<B�����;����[����=� ��_9����J�����)�;��<������=$�8<˕?<ZP�R̽;���;H
�]Ƿ��T��ռ���<�����%���zb=�+�;�.�O� =\�<'�U�ƠV=}e�����+�|$<��<Ӳ<4���Oռe�<��]��cZ<zhs��;=T����7���i;o�=���<���;�B<$n�;�=�d!�������:?��;h�	�Z�'�	�<�v�/����Y<�;P<��:|$=f���$��;�����̼���W�s��Xf�ћP�ϛ�=������G�'��<��h<'�p��H9:���ݾ#�=1W�=�q<�ĺ��;;���<��*;9dG=�ߤ��Ǥ;�R���k=�燼Ə��X�<�N����*� ڀ��	';�z�;���<�$�<��m�';�ı�<��=JT*�Ӳ�<�ệ����<���&�=y���Y�9�5,������=0�&=e�����<lE�;D\<ol<���<V�M���<KT�;6+���@�Hv�:�����=f�u�,=˕�;��A�]3m�w��<��<|��Բ�;��a9:<D�<eP/=\���������<|ɉ<�]�<S��D�&=n��l�i<<.����r�;9�=?��<'����	�<l#�<\}����Ż?H���!k<���<om������K��o�<�����Y�<��<�.T�$��O�<��=ssF�
P�<K|�8�����?Y0;�^g�������1ļ9�<��<�|x;�v��q;x_��(�K�`��{)�dr��`��(j
RowID

	����̷��
	Timestamp

	ه��̷��(


milvus_id: 452165072252045715
data:
4source&2$
"app/Http/Middleware/TrustHosts.php(d
7	file_path&2$
"app/Http/Middleware/TrustHosts.php(e
#	file_name2
TrustHosts.php(f
	file_type2
.php(g
�text�2�
�<?php

namespace App\Http\Middleware;

use Illuminate\Http\Middleware\TrustHosts as Middleware;

class TrustHosts extends Middleware
{
    /**
     * Get the host patterns that should be trusted.
     *
     * @return array<int, string|null>
     */
    public function hosts(): array
    {
        return [
            $this->allSubdomainsOfApplicationUrl(),
        ];
    }
}
(h
pk

	����̷��(i
�0evector"�0��0
�0�M���<Q.=��<7j<�
|��(%���<2ʃ�d��9�ټ����:����J�P��B�<:�=g�<���<�.�=@@�;"��q�$+��F��8��Tһ�V?=�s=�-�<7o;<䛡<�JA<Q��<�w<g%�;��E=���<�6�<.��;����q�
���LW�<�s>�b?����<Z�3=2��<��x����W2�<�\v�F�<�p<c]/=��Y<��?�rB�S�
=��5=:@�z��=B��;9���HT��0<���<�*�;��O����:����<^cf�\	�<�	�Q.=V7��D�9<��=IЂ<}�ۼg�<�\v:O�S����<,�!���G<�h=�ظ��ͼ�7�;��:���l�t}&==�<�=)���;d��:�,���XJ���E;^w'��4=Ԩ9;7Lu����<��(�q�79��<�=�|=4���<?�p�-`=T��%T���{�<c:�;�2�tZ`�W�t�<!����Ǽgl<�m=q�q;��\;�=��?�2�8;H��;�po;z��:�8=)�2���7=�߰:�����\����M���v��<,����BF�	6��M�=_�����k���<�kû��1����;��"��k<�$����|�ߒS<U�����<�F0�<��)�	"m��n����ռ|�Q<>â<$<�f^<0\�<�����;�9�<�k=Y��<
�<w����y�4��<|�Q���r���g���<����7S<ú�����<!�=6.k��i-�yO��1k�;ʻ�-�0�?��</M��r\=}5�4�=��;�V�9�0��(%=��6=Z���`n<�z�<2���������<�t����N��'�N���=�e=��v��h<�C(=��=组p�<LW�<Ƞ�<�ί9��@�?ᬽ�K=4�;"�ռ����7�����G��=�<ɛY=��:=R���֪<
��U��;Bw_�+v�	6.<�+U<��;���<�Z�<�8��N�������E��{�s_�;z��&=~:���9�tI<8��S��;k�亁՟=�	q���<`���� ��䌜;�䕼"�ռ���:�<=O��C�����M���Z���<�K#<��ۼ��	=v�:=�<=e���M�a�=0T��A=�W!=�.=4	�@@���U];�K�<Q��度<`�@=�����V�<�*���3=L%�<�H�<R~�������A�DǴ�[�<J�F�����r�;�Re�E=��v�ĺ�|m;+Dѻm[�:������܏<{��\	H;��b���<g�Ἕ�e<������<�d����<�
�< �<!U��%��~���摻����<-`�IЂ��\v��
�`�<eˎ�����|ļg4�<��y����J�=-�����A��://�;��_<?�,���ۼ��$��]X=�����3��=�<c;%Oļ��a	��G�%�<zr3���4���<+g�<���i�=٢�<i��=,�&<'��<�=���FD=g@<��<1z��H�-={�
<=�<a=d����ξ��	���1=w	����<���@Y�U�j<�<��{<`􋽮�rL�zmw=m[
��I߼`�<S���}'����<
��<Ԩ9�f�׼�c��m=���=����༈��Q�;��$=�`'������H��V<��<uxj���	���E=	"m����<|�Q�zm��U�0��8�//����8����:^cf=z�=�A^���~�<��5=)�������
��Q<�=�f�<�A<�!D;��d=�z�<
c����<;(��ÈB�4��;��S=�i�<�Y�<�/���n=`�=�A�<d�ü���J�ƻnGɼ��
�#�I�=�>켆�"�ipƼ�A������4�;���=��ߵ�=c]�<T��<�`лgl<�Ѽ��09޼\	H<��=Am���ۼ%,���<yOm�ߵ����<ަ=?��<-������"����n<�ξ�6B,�����[���v��<,��Y����^=:�����������>4<t���Kۼ�b={�:�E���'�8�+<�>l<�����#�G <�w;ٝF=��H<ߒӼ�[�~I6=w�μo�ݻ%OD����;r#���//;��;,�e<뽽�j�=4���r\���l<��<�<<��<��`���b<E�������7S<+X��<��;R8�<'�<��<�{b�9��<p��<s_�rB�8��:�	q��/<+X<`�@:0\����3�����m:�-�����w�kޥ<y1��:;��G=�ƚ���ɼ~x:)==d�:�kC�E�}�/��<����"��<2�=��x�"�U��Y��o�ݻm[
��ӣ<^�,<W�; Z�<幫<S���$�i��B��Ѽ�&��=�=9�ټ��������A!<�<�����<\,<g�:<�=bN*�~&�<Mf5=���&��V<�=���;�ɼ�����溼S��;�!���=ɛY;�>��V7���ຟ>�K*��g�<�d����;�����<(ۭ�,��<�Qڻ��l�<d�;S�:��(=V�;yc��]�<��V<�����9I�<����_��I�v<cX�;�\�*&G<�Z��SyL<�V�<�<�/=��;<�kü'��P):w�N<R<ќ=�BƼ�x#��G��
�<R8|<s<�:�ɒ;N�����;t���,<a�T<��:A^=�+U��R<�;=����M9<M�����;<�Y�9ݚ�_��<�^c=7o�<�p���A��鉼`�<�o�#�_;#�߼�G�<���9��K�<x	�N����q���~��G<���tZ`<�><V<D��d�C;'����ܻ�s�;R~<��ؼ�A��
<"Ȗ;�7�٢=���<�w;p��:xټXPO��3�<��;=�y�<�R-<!x����<����d�;�!=6.�<��<dH�ΐf<k�<D�s��<�;+v�<U�0=9ݚ�v��<��;�:�8���ԅ�<���<��<���N�I�w�μ��\�����+�y1�<d{�<����7��;�[��� ��������:��ۼBYU��O�;���
����7S<����Zͳ;����a�ԼWF������D
<�>켺�F��%�z�=<~I6<%c=�����Ÿ���=+v�K�AO�<�
K=�����"=4����;�Ÿ;�::ÈB��
=�ί�xE�;�%=度<`��;���;��"���߻�;C�`�<3荼�x�����<�*�<� =�3P��b�V7����;��=��x�����G;�?�����HT�
��,�!;���<��U<�<��x6�<?�;���<]EܼS���
���գ����M�V�8�<U����^<�<W2E���;�r\��M����>=hR�<4��<%��3����<@��"�˼�D
=tZ�"�U����:2��Y<��<���<�v
:��<U��<�^��w	<s_=�v�<�p��3�B=e�<�+�;X�<nGɼ���;���<�HԻ�I_��qQ<գ�����<�}��
1�����OԔ��
�<��	<٢��8�E<#��<Ϯ�;d{9==��<x'�L%�<�H}8l��'��it�'��<1Wh<��޼�I'��?N=v�~��=�8�<N����=��<K�<`���<4	�/ �<�ܩ��}�<Q=�<�U��Q=�<����R-�C��<O�Ӽ����hu�.�:
����/����Ma�;�������D�4<
�e����<�}O=��>�Qr��==%OD<���<�F��3P����[<������<�A��٢�<"�U:���;�gi<�7<-�5�M�:�
�;�h˼+v��|�<��8�� 9;�	=E�C=����՟<�t���<�Y�)<�<���<7o;��f޻cXs;���\;�Xn�<�h�M׼:�;��0<?��p�(;�K�<{��<T��%1:=�^;�e<{э��BƼb?�<`�@�b?��dv}�Q.=� =�>�<~I����/�ɼ䌜<���%O�;�HT�4	<ٱ;*:�=�=/=�I<��x��Z�;0M�ɛY��<�Y�<f����K<:@���)�IЂ;�9XP�<�۞<�<�~ڼ�j�~&p:�[�<�7*���7=���<�-B��>C<Gq���غy1�<V����=|�䕻3荺Q=8<�-�<.�=��v�:���z�D�s<��E<��Z��ۼ3荼�	��>����<�=��<�W!�k� ��Z��Q�<�^��Q=8<k�d<_��7*;W2�<�@ټ�5�<���<<����:=�����<����9ݚ��qQ�ќ;��R��?μV;�09޼���ż~:1��g�<��_���T��ݴ�-�5�
��ë�
�����y8@����<��������<v�t<��;��yc�;�眻適�@@=��a<�����
K�^��<��\�z��<xE$����+D�<N�I=m=�<���R���
=���<�g�<}�[�|��<~:1���!�A!�큽�쐼�$<�y1c�Nŏ<1k)���%�D�s<!xA;I�<<��<�,7=Z���xټ�Ά<ux�<�)�)�v�$+�.�?<������v<�:<�'=O�<��<��%�K۹H�2<l���ǂ=����7Lu<Y�)�B|�<���;��ҼLH�<"�U��hK��Ÿ��L�;��(�(��8��K��=LH�;,��;�7Ӻ\'һ��0=��<d{�����<!U���3=�=�=��p�'���g42�N�
�XnY<f��;���;�H���-=1Wh��I���	6.���	��5�.��zW��!��`P��	�<%���X;�f�<��	�N����t�:u��;�ϑ<;�;������~�~&�5==/M=s<�<b0��`�=�\�;���<Bw߼�d�<n0�-�o<�G<yc��ë�;�V��[	=���{�;y1�<���A�;�=���<i�=|�<�BF�v�:=��?=�=�<�y�<MC�<,���^�;;�c]�9FS�<���R~=�7�<��@=�K�����!���!U��K<��=hR���W;ޗ<%T�<幫�Ԩ9;�$�<~I���/�<��<�~��鐮�J�F�V%���#=���:�G��+U�m)�;Gq(��ξ9�1+�� �<N�
:rB;�<�;2���G=N�<�Px909�;yO�<4<�ۺ�`'�C��Ó�3�»�~Z=��N<�����Xn�<�A�=_���T��R����/��\�ٝF��d�9Q.�:�n�<��;FN��,7�I����~Z<3�B�
c=<�
���e�<"Ȗ��2�<��T�Y�c�� 9<�������<*I�<m���V��8��ڼ���;�Q����;<�<"�K<�L.�Y���4���=�+U�Ԩ9�/ �<�=a��;LW�<�
��������<7j�����鐮<r�<Y���Q�g����:}�[;�hK�S�
�v�:�8��Ro=��5���n:]h"��h˼��sP�<�\�����D����6=3�»���<j��:�^<E��^:����;`���qѼRo=��,;;#��	E3:�zm�<w�N�m)�<f��;.�y;e��C���x<�M9<7o���˻'�X9�Y<Gb#<XJ<c��{���<�~<MW;���<�;�>���ڄ<�q�<�k=��%<�M����:z��<�@0<p��9�-
=j�P�D�s<������<b�:���;���<��<�E�T�!�F5<%,~��'�<~�<#�%�
c=<2;g42=�����K�:7Lu<�C�<2��<Am�=K꼶S���;�U]<p����;�w=`�ʻ�=a����<�<<n�<z��<.߿<-���C�i<��d�ޗ�<�j���'<1Wh��BF<g���y��"�˼��;�ڄ;#��<T��<C�D�9�]Y��D�9��!����<��C��� �:@����;�������;DǴ<.�<Ԩ�<��$�i��E<.߿;|�Q;g@�W�s_��ʬ;(j
RowID

	����̷��
	Timestamp

	ه��̷��(


