Skip to content

Commit

Permalink
Update LoansController.php
Browse files Browse the repository at this point in the history
Use Method class instead hardcoded string
  • Loading branch information
ikhsan3adi committed Jul 9, 2024
1 parent fd878d9 commit 48f435a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Controllers/Loans/LoansController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use App\Models\LoanModel;
use App\Models\MemberModel;
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\Method;
use CodeIgniter\I18n\Time;
use CodeIgniter\RESTful\ResourceController;

Expand Down Expand Up @@ -237,7 +238,7 @@ function ($carry, $item) {
*/
public function new($validation = null, $oldInput = null)
{
if ($this->request->getMethod() !== 'POST') {
if ($this->request->getMethod() !== Method::POST) {
return redirect()->to('admin/loans/new/members/search');
}

Expand Down

0 comments on commit 48f435a

Please sign in to comment.