Category : inertiajs

this is my webpack.mix.js const mix = require(‘laravel-mix’); /* |————————————————————————– | Mix Asset Management |————————————————————————– | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel applications. By default, we are compiling the CSS | file for the application as well as bundling up all the JS files. ..

Read more

The following code of inertiajs with vue only works this way computed: { flash: function () { if (this.$page.props.flash.message) { this.$toast.open({ type: this.$page.props.flash.type, message: this.$page.props.flash.message.message, }) } return this.$page.props.flash.message } }, watch: { flash: function (newVal, oldVal) { } }, but if i remove the watch part, it doesn’t work. Also if i put the ..

Read more

In a Laravel Jetstream app (using VueJS and Laravel), I have a simple month calendar page (using this example from CSS Tricks) that works great. I have it working great, and it switches months just fine. It’s wired to a Laravel controller that does what it should; public function calendar() { $now = Carbon::now(); $currYear ..

Read more

hi im using InertiaJs and laravel 8 and i make a flash message component , using inertia shared data after a function i call the flash message using with-> on controllers public function test(Request $request) { Test::create([ ‘comment’ => $request[‘comment’], ]); return Redirect::back()->with(‘success’,’Test.’); } but Then i make shopping cart using vuex and i dont ..

Read more

I’ve this route code: // route.php Route::post( ‘/page’, [AppHttpControllersPageController::class, ‘index’] )->name(‘page.details’); My controller: // PageController.php public function index(Request $request) { return Inertia::render(‘Page/PageDetails’, [ "name" => $request->name, "overview" => $request->overview, "url" => $request->url ]); } It’s working, fine, but If I try to reload ( F5 ) it’s return an error 500. Have some way to ..

Read more

the generated page source code stays like this after setting up Ziggy and running npm run watch. <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <link href="/css/app.css" rel="stylesheet" /> @routes <script src="/js/app.js" defer></script> </head> Supposedly, @routes should be converted into something like this: <?php echo app(‘TightencoZiggyBladeRouteGenerator’)->generate(); ?> Here are my codes: webpack.mix.js ..

Read more

in vuejs2 applications I created common mixin and referenced it in resources/js/app.js like : require(‘./bootstrap’); import Vue from ‘vue’; import common from "./common"; Vue.mixin(common); But I failed to make similar in Laravel 8/Inertia.js 0.4/vuejs3 application : import Vue from ‘vue’ // i got compile error : export ‘default’ (imported as ‘Vue’) was not found in ..

Read more

I have a short question. Does inertia render asynch? I realized, as soon I delete a DB – Entry, while I connect to new Nav-Link direct afterwards (onStart), the changes (onSuccess) wont be showed up. Inertia.post(‘data-delete’, { id: this.meeeh.data[index].id, }, { preserveScroll: true, onBefore: () => { window.Toast.confirm(‘Delete?’); }, onStart: (visit) => { window.Toast.load(‘Delete…’); }, ..

Read more

I keep receiving this error. My app has vue component for searching product: <template> <form @submit.prevent="searchProduct"> <input placeholder="Search" v-model="form.q" type="search"/> </form> </template> <script> export default { data() { return { form: this.$inertia.form({ _method: "get", q: ”, }), }; }, methods: { searchProduct() { this.form.get(route(‘search.product’, {q : this.q}), { errorBag: "validate_q", preserveScroll: true, }); }, }, ..

Read more