-
-
Notifications
You must be signed in to change notification settings - Fork 176
Laravel 7.x installation
LocalHeroPro edited this page May 3, 2020
·
4 revisions
$ composer require proengsoft/laravel-jsvalidationAlso you need to publish configuration file, Javascript assets and views by running the following Artisan commands.
$ php artisan vendor:publish --provider="Proengsoft\JsValidation\JsValidationServiceProvider"By default we use bootstrap to render Javascript validation code. You may want to change the version of bootstrap to bootstrap4 in config/jsvalidation.phpby editing that line:
'view' => 'jsvalidation::bootstrap4',Keep in mind to copy your files using mix, so add in webpack.mix.js file
mix.copy('vendor/proengsoft/laravel-jsvalidation/resources/views', 'resources/views/vendor/jsvalidation')
.copy('vendor/proengsoft/laravel-jsvalidation/public', 'public/vendor/jsvalidation');
and add these files to .gitignore to prevent them being tracked
/resources/views/vendor/
/public/vendor/
After that Laravel project preparation You can use thet package like on this example: https://github.com/proengsoft/laravel-jsvalidation/wiki/FormRequest-Validation-Example