Category : vue.js

This is a new-comer question. I have a Blade template: <div id="app"> <example-component :componentMessage="appMessage" ></example-component> </div> <script> var app = new Vue({ el: "#app", data: function() { return { appMessage: {{$message}} } } }) </script And a Vue component ExampleComponent.vue <template> <p>{{componentMessage}}</p> </template> <script> export default { props: [‘componentMessage’], } </script> So the data flow ..

Read more

This is my Laravel PenilaianController: public function index() { // $penilaian1 = PenilaianTahap1::join(‘peserta_t1’, ‘nilai_t1.nim’, ‘=’, ‘peserta_t1.nim’) ->join(‘pendaftar’, ‘peserta_t1.nim’, ‘=’, ‘pendaftar.nim’) ->join(‘sub_kriteria_t1’, ‘nilai_t1.id_sk1’, ‘=’, ‘sub_kriteria_t1.id_sk1’) ->join(‘kriteria_t1’, ‘sub_kriteria_t1.id_k1’, ‘=’, ‘kriteria_t1.id_k1’) ->get([ ‘nilai_t1.nim’, ‘pendaftar.nama’, ‘nilai_t1.nilai’, ‘nilai_t1.id_sk1’ ]); $subkriteria = SubKriteriaTahap1::join(‘kriteria_t1’, ‘sub_kriteria_t1.id_k1’, ‘=’, ‘kriteria_t1.id_k1’) ->get([ ‘sub_kriteria_t1.sub_kriteria’, ‘sub_kriteria_t1.bobot’, ]); $kriteria = KriteriaTahap1::all(); $response = [ ‘message’ => ‘Data pendaftar OR ..

Read more

This is my Laravel PenilaianController: public function index() { // $penilaian1 = PenilaianTahap1::join(‘peserta_t1’, ‘nilai_t1.nim’, ‘=’, ‘peserta_t1.nim’) ->join(‘pendaftar’, ‘peserta_t1.nim’, ‘=’, ‘pendaftar.nim’) ->join(‘sub_kriteria_t1’, ‘nilai_t1.id_sk1’, ‘=’, ‘sub_kriteria_t1.id_sk1’) ->join(‘kriteria_t1’, ‘sub_kriteria_t1.id_k1’, ‘=’, ‘kriteria_t1.id_k1’) ->get([ ‘nilai_t1.nim’, ‘pendaftar.nama’, ‘nilai_t1.nilai’, ‘nilai_t1.id_sk1’ ]); $subkriteria = SubKriteriaTahap1::join(‘kriteria_t1’, ‘sub_kriteria_t1.id_k1’, ‘=’, ‘kriteria_t1.id_k1’) ->get([ ‘sub_kriteria_t1.sub_kriteria’, ‘sub_kriteria_t1.bobot’, ]); $kriteria = KriteriaTahap1::all(); $response = [ ‘message’ => ‘Data pendaftar OR ..

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

Geek’s Need little help, any suggestion or hint will be highly appreciated. The thing is I’m trying to install Vue on Laravel. But after installing the Vue router I decided to compile everything using "npm run watch" but I’m getting the following error on the console: Note* Before running the "npm run watch" command the ..

Read more

I am trying to get vue-router to work in a Vue.js/Laravel project. I have the following simple pages: home page: about page (scrolled down in single page): Made from these files: welcome.blade.php: <!DOCTYPE html> <html lang="{{ str_replace(‘_’, ‘-‘, app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=WeakMap"></script> <title>title</title> </head> <body id="body"> <div ..

Read more

I’ve recently been looking into the Laravel PHP framework. Since I have never worked with backend frameworks, it feels quite complex. Is there maybe something smaller on the market for developing smaller, RESTful Web Apps, specifically with vue.js in the Frontend, which require only a manageable logic? As a beginner, it would of course be ..

Read more

anyone knows how to submit file with bootstrapVue file input? I am getting null from request->all() array:13 [ … "calibration_cert" => array:1 [ "$path" => null ] ] Below is what I tried <b-form-group label="Calibration Cert:"> <b-form-file v-model="form.calibration_cert" :state="Boolean(form.calibration_cert)" placeholder="Choose a file or drop it here…" drop-placeholder="Drop file here…" ></b-form-file> </b-form-group> ….. methods:{ onSubmit(event) { ..

Read more

I have a Laravel/Vue3 project. For some reason I cannot get the right link to public/js/app.js. My blade file: <!DOCTYPE html> <html lang="{{ str_replace(‘_’, ‘-‘, app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel</title> </head> <body> <div id="app"> <map-app/> </div> <script src="{{asset(‘js/app.js’)}}"></script> </body> </html> In my .env file: APP_URL=https://www.evenuitrusten.nl ASSET_URL=${APP_URL}/bankjesserver/public I then get the ..

Read more

Where can i put the Authorization header token in axios after dispatching login action with laravel passport authentication in a seprated vue.js project?I tried with setting it in main.js like this and doesnt work properly. After dispatching, In the QuestionIndex component, the axios call dont have the authorization header automatically. And by refreshing the page, ..

Read more

‘laravel8 + vue3 error Uncaught TypeError: Cannot read properties of undefined (reading ‘component’) how can this error be avoided ? app.js window.Vue = require(‘vue’).default; Vue.component(‘hello’, require(‘./hello.vue’).default); const app = new Vue({ el: ‘#app’ }); welcome.blade.php <body class="antialiased"> <div class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center py-4 sm:pt-0"> <div id="app"> <hello></hello> </div> </div> <script src="{{mix(‘js/app.js’)}}"></script> ..

Read more

I’m running a Laravel 8 and Vue 3 project on laradock, compiling with Laravel Mix. All was working fine and I only updated the PrimeVue version. The problem is that after running npm install and npm run dev I get the following error: Error: Cannot find module ‘p-limit’ Require stack: – /var/www/node_modules/p-locate/index.js – /var/www/node_modules/locate-path/index.js – ..

Read more