30 lines
752 B
PHP
30 lines
752 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class ActionTypes extends Component
|
|
{
|
|
public $actionTypes = [
|
|
'LOGOUT' => 'Logout Initiated',
|
|
'LOGOUT_SUCCESS' => 'Logout Successful',
|
|
'LOGOUT_RESET' => 'Logout Reset',
|
|
'FETCH_DATA' => 'Fetch Data Initiated',
|
|
'FETCH_DATA_SUCCESS' => 'Fetch Data Successful',
|
|
'FETCH_DATA_ERROR' => 'Fetch Data Failed',
|
|
'FETCH_DATA_RESET' => 'Fetch Data Reset',
|
|
];
|
|
|
|
public $actionType = 'FETCH_DATA_SUCCESS'; // Default action type for demo
|
|
|
|
public function mount($actionType = 'FETCH_DATA_SUCCESS')
|
|
{
|
|
$this->actionType = $actionType;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.action-types');
|
|
}
|
|
} |