PHP code example of shibuyakosuke / laravel-database-validation
1. Go to this page and download the library: Download shibuyakosuke/laravel-database-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/ */
shibuyakosuke / laravel-database-validation example snippets
php artisan rule:publish
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use ShibuyaKosuke\LaravelDatabaseValidator\Facades\ValidationRule;
class CompanyFormRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return ValidationRule::get('companies');
}
}