Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (17 loc) · 522 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 522 Bytes

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')