PHP code example of sands / laravel-controller-validation
1. Go to this page and download the library: Download sands/laravel-controller-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/ */
sands / laravel-controller-validation example snippets
// in app/Http/Controllers/UsersController.php
use App\Validations\UsersControllerRules;
...
public function __construct()
{
$this->middleware('validation:' . UsersControllerRules::class);
}