Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
I
IPRSv2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Ngei
IPRSv2
Commits
801fb24b
Commit
801fb24b
authored
Mar 24, 2025
by
Michael Ngei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added passport endpoint
parent
26fb0a52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
Passport.php
app/Http/Controllers/API/Passport.php
+33
-0
No files found.
app/Http/Controllers/API/Passport.php
0 → 100644
View file @
801fb24b
<?php
namespace
App\Http\Controllers\API
;
use
App\Http\Controllers\Controller
;
use
App\Models\Doi_date
;
use
Illuminate\Http\Request
;
class
Passport
extends
Controller
{
//
protected
function
passport_check
(
$passport_num
,
$id_num
,
Request
$request
)
{
if
(
!
empty
(
$passport_num
)
&&
!
empty
(
$id_num
))
{
$passport
=
Doi_date
::
where
(
'passport_no'
,
$passport_num
)
->
where
(
'identity_card_no'
,
$id_num
)
->
get
();
return
response
()
->
json
([
'status'
=>
'success, Found'
,
'passport_num'
=>
$passport_num
,
'id_num'
=>
$id_num
,
'passport'
=>
$passport
]);
}
else
{
return
response
()
->
json
([
'status'
=>
'Not Found'
,
'data'
=>
[
'passport_num'
=>
$passport_num
,
'id_num'
=>
$id_num
]
],
400
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment