Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tonning/vue-laravel-errors

tonning16MIT1.0.1

Vue helper to use Laravel's error message bag

laravel, vue, errors

readme

Installation

Pull in by running: yarn add @tonning/vue-laravel-old

In your app.blade.php layouts file add:

<script type="text/javascript">
    let Laravel = {
        error: {!! json_encode($errors->messages()) !!},
    };
</script>

In your app.js file

  • import Vue from 'vue'
  • import VueLaravelOld from 'vue-laravel-error'
  • Vue.use('vue-laravel-error', Laravel.error)

Usage

Now you can use it in Vue and your Vue components
Vue.$error.get('email') or this.$error.get('email')