Skip to content

Laravel 5.6 installation

Aristheo Lacdao edited this page Nov 4, 2018 · 2 revisions

Latest Stable Version Latest Unstable Version Total Downloads License

Modify composer.json

To install this package add proengsoft/laravel-jsvalidation:>2.2.0 in your composer.json. You should change post-update-cmd scripts section to ensure that the Javascript assets are updated.

{
    "require": {
        "laravel/framework": "5.6.*",
        ...
        "proengsoft/laravel-jsvalidation": ">2.2.0"
    },
    ...
    "scripts": {
        "post-update-cmd": [
            ....
            "php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force"
        ],
    },
}

Run composer update command to install the package.

$ composer update

Publish assets

Also you need to publish configuration file, Javascript assets and views by running the following Artisan commands.

$ php artisan vendor:publish --provider="Proengsoft\JsValidation\JsValidationServiceProvider"

Change bootstrap version

By default Laravel 5.6 uses bootstrap 4, you may want to change the version of bootstrap in config/jsvalidation.php

'view' => 'jsvalidation::bootstrap4',
Clone this wiki locally