Skip to content

Commit cfbb69f

Browse files
committed
FIX | Some errors in api students when search in SHOW
1 parent c82bec3 commit cfbb69f

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

app/Console/Commands/BarcodeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function generateQrCodes($model, $disk)
7171
);
7272

7373
$logo = new Logo(
74-
path: public_path() . '\imgs\2-bg.png',
74+
path: public_path('imgs/2-bg.png'),
7575
resizeToWidth: 100,
7676
);
7777

app/Http/Controllers/Api/StudentController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ public function index()
2222
/**
2323
* Display the specified resource.
2424
*/
25-
public function show(Student $student)
25+
public function show(string $student)
2626
{
27+
$student = Student::where('uuid', $student)->orWhere('document', $student)->first();
2728
return new StudentResource($student);
2829
}
2930

31+
3032
/**
3133
* Store a newly created resource in storage.
3234
*/

app/Livewire/Auth/Developer/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class Login extends Component
1818
{
1919

20-
#[Validate('required|int|email')]
20+
#[Validate('required|email')]
2121
public int $email;
2222

2323
#[Validate('required|string')]

0 commit comments

Comments
 (0)