Skip to content

Commit

Permalink
Use str_replace instead of Str::replace (#268)
Browse files Browse the repository at this point in the history
Str::replace introduced in Laravel 8.41.0, we should also support lower versions.
  • Loading branch information
hos3ein authored Jan 3, 2023
1 parent fadb14a commit b6db6f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Provider/PaymentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Shetabit\Multipay\Payment;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Str;
use Shetabit\Multipay\Request;
use Shetabit\Payment\Events\InvoicePurchasedEvent;
use Shetabit\Payment\Events\InvoiceVerifiedEvent;
Expand Down Expand Up @@ -67,7 +66,7 @@ public function register()
// use blade to render redirection form
Payment::setRedirectionFormViewRenderer(function ($view, $action, $inputs, $method) {
return Blade::render(
Str::replace('</form>', '@csrf</form>', file_get_contents($view)),
str_replace('</form>', '@csrf</form>', file_get_contents($view)),
[
'action' => $action,
'inputs' => $inputs,
Expand Down

0 comments on commit b6db6f7

Please sign in to comment.