Closed joe94113 closed 2 years ago
development environment
// package.json "laravel-mix": "^6.0.6", "vue": "^2.6.14", // composer.json "laravel/framework": "^8.65", "mariuzzo/laravel-js-localization": "^1.9",
In webpack.mix.js,remember npm i laravel-mix-serve
webpack.mix.js
npm i laravel-mix-serve
require("laravel-mix-serve"); mix.serve("php artisan lang:js");
In app.blade.php
app.blade.php
<script src="{{ asset('messages.js') }}"></script>
In vue
vue
<template> <p>{{ Lang.get("admin.login") }}</p> </template> <script> export default { data: () => ({ Lang: Lang, }), };
development environment
In
webpack.mix.js
,remembernpm i laravel-mix-serve
In
app.blade.php
In
vue