PHP code example of prinsfrank / php-validated-properties
1. Go to this page and download the library: Download prinsfrank/php-validated-properties library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prinsfrank / php-validated-properties example snippets
use PrinsFrank\PhpStrictModels\Model;
class ValidatedModel extends Model {
}
use PrinsFrank\PhpStrictModels\WithValidatedProperties;
use Illuminate\Database\Eloquent\Model;
class ValidatedModel extends Model {
use WithValidatedProperties;
}
use PrinsFrank\PhpStrictModels\Model;
use PrinsFrank\PhpStrictModels\Rule\Between;
use PrinsFrank\PhpStrictModels\Rule\Url;
class ValidatedModel extends Model {
#[Between(1,5)]
protected int $nrOfItems;
#[Url]
protected string $url;
}