Create a cluster on GKE:
gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4
Get credentials:
gcloud container clusters get-credentials backend
Build the docker image:
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
<?php | |
namespace App\Casts; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class EncryptedJson implements CastsAttributes | |
{ | |
/** | |
* Cast the given value. |
Create a cluster on GKE:
gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4
Get credentials:
gcloud container clusters get-credentials backend
Build the docker image:
Register the macro in a service provider or use the MacroServiceProvider
to keep things tidy. Be sure to register it in the array in the /bootstrap/providers.php
file.
You can then use the test example to “use” a dataset to run through your validation rules.
It will execute each item in the dataset, building the request for the provided parameter and the (incorrect) value, and then assert that the error is as expected.
If the validation fails to run, the error will not be found, and the test will fail. Similarily, if the error message changes, the test will fail.