PHP code example of bbprojectnet / laravel-casts

1. Go to this page and download the library: Download bbprojectnet/laravel-casts 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/ */

    

bbprojectnet / laravel-casts example snippets


protected $casts = [
	'roles' => AsEnumArray::class . ':' . Role::class,
];

protected $casts = [
	'roles' => AsEnumCollection::class . ':' . Role::class,
];

protected $casts = [
	'password' => AsHash::class,
];

protected $casts = [
	'timeout' => AsInterval::class,
];

protected $casts = [
	'items' => AsStrictArray::class,
];

protected $casts = [
	'timezone' => AsTimeZone::class,
];