PHP code example of etelford / laravel-api-validation
1. Go to this page and download the library: Download etelford/laravel-api-validation 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/ */
etelford / laravel-api-validation example snippets
use Etelford\LaravelValidation\HandlesApiRequests;
namespace App\Validation\User;
class Store extends \Etelford\LaravelValidation\BaseValidator
{
public function rules() : array
{
return ['email' => '
// UserController.php
public function store($request, $id)
{
$this->validate($request, 'User::Store');
}