27 lines
630 B
PHP
27 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
use Jenssegers\Agent\Agent;
|
|
|
|
class PublicTopErrorPage extends Component
|
|
{
|
|
public function backHandler()
|
|
{
|
|
$agent = new Agent();
|
|
|
|
if ($agent->is('iOS')) {
|
|
// Trigger iOS native handler
|
|
$this->dispatchBrowserEvent('ios-top-up-failed');
|
|
} elseif ($agent->is('Android')) {
|
|
// Trigger Android native handler
|
|
$this->dispatchBrowserEvent('android-top-up-failed');
|
|
}
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.public-top-error-page')->layout('layouts.app');
|
|
}
|
|
} |