for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\JsonApi\Likes;
use CloudCreativity\JsonApi\Contracts\Validators\RelationshipsValidatorInterface;
use CloudCreativity\LaravelJsonApi\Validators\AbstractValidatorProvider;
class Validators extends AbstractValidatorProvider
{
/**
* Get the validation rules for the resource attributes.
*
* @param string $resourceType
* the resource type being validated
* @param object|null $record
* the record being updated, or null if it is a create request.
* @return array
*/
protected function attributeRules($resourceType, $record = null)
return [
//
];
}
* Define the validation rules for the resource relationships.
* @param RelationshipsValidatorInterface $relationships
* @return void
protected function relationshipRules(RelationshipsValidatorInterface $relationships, $resourceType, $record = null)