@tonning/vue-laravel-errors
v1.0.1
Published
Vue helper to use Laravel's error message bag
Downloads
3
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 componentsVue.$error.get('email')
or this.$error.get('email')