<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abather / spatie-laravel-model-states-actions example snippets
use Abather\SpatieLaravelModelStatesActions\State;
use Spatie\ModelStates\StateConfig;
abstract class PaymentState extends State
{
public static function config(): StateConfig
{
return parent::config()
->default(Pending::class)
->allowTransition(Pending::class, Paid::class)
->allowTransition(Pending::class, Failed::class)
;
}
}
namespace App\States\Order;
use App\States\State;
use Spatie\ModelStates\Attributes;
abstract class OrderState extends State
{
protected static ?bool $
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.