PHP code example of fhteam / laravel-validator
1. Go to this page and download the library: Download fhteam/laravel-validator 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/ */
fhteam / laravel-validator example snippets
class OrderControllerValidator extends FrontendControllerValidatorWhenResolved
{
protected $rules = [
'*' => [
'user_id' => ' 'postCreate' => [
'title' => 'max:100',
'categoryId' => 'tFileDelete' => ['route' => ['orders_edit', ['orderId' => '#orderId']]],
];
}
class OrderController extends Controller
{
/**
* @var OrderControllerValidator
*/
protected $validator;
/**
* IoC invoked constructor
*/
public function __construct(OrderControllerValidator $validator) {
$this->validator = $validator;
}
public function getShowValidatedData() {
return Response::make($this->validator->description);
}