File manager - Edit - /var/www/html/ciosp/api/app/Http/Services/GeneralSearchService.php
Back
<?php namespace App\Http\Services; use App\Classes\BaseServiceResponse; use App\Models\NotificationAuto; use App\Models\NotificationTerm; use Illuminate\Http\Request; class GeneralSearchService extends BaseService { public function searchByDocument(Request $request): BaseServiceResponse { $data = $request->all(); $document = $data['document']; $data = []; //Pesquisar em Transporte $notifications = NotificationAuto::where('offender_document', "$document")->get(); foreach ($notifications as $key => $value) { $data['transporte']['auto_notificacao'][$key] = $value->toArray(); } //Pesquisar em Postura $notification_terms = NotificationTerm::where('doc', "$document")->get(); foreach ($notification_terms as $key => $value) { $data['postura']['termo_notificacao'][$key] = $value->toArray(); } //Pesquisar em Transito - na task backend não tinha campos de documentos return $this->success( $data ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings