Category : vue.js

i wanted to upload image using vue template in laravel i just create a simple code but i got this problem.. check my code below <template> <dir class="composer"> <input type="file" @change="sendFiles"> <textarea v-model="message" @keydown.enter="send" placeholder="Message…"></textarea> </dir> </template> <script> export default { data() { return { message: ”, files: [] }; }, methods: { sendFiles(event) { ..

Read more

Good night everybody! I have one blade, when I have two different buttons: <div class="col-md-12"> <button v-on:click="isHidden = !isHidden" type="button" class="w3-btn w3-blue" style="width:40%"><i class="fa fa-table fa-2x"></i> <br>SCHEDULE DATE</button> <br/> <br/> <button v-on:click="isHidden = !isHidden" type="button" class="w3-btn w3-blue" style="width:40%"><a href="" class="text-white"><i class="fa fa-table fa-2x"></i> <br>SHOW DATES</a></button> </div> <div class="col-md-12 col-xl-12"> <scheduledate v-if="!isHidden"></scheduledate> </div> <div class="col-md-12 col-xl-12"> ..

Read more

I have a code like this in VUE like() { var data = { model_id: ‘{{ $user->id }}’, model_class: ‘AppModelsUser’ }; const token = document.head.querySelector(‘meta[name="csrf-token"]’); fetch(‘{{ route(‘like’) }}’, { body: JSON.stringify(data), credentials: ‘same-origin’, headers: { ‘content-type’: ‘application/json’, ‘x-csrf-token’: token.content, }, method: ‘POST’, mode: ‘cors’, }).then(response => { if(response.data.success_message) { console.log(‘true’) } }) } I need ..

Read more

when sending the parametor through the route, the list of marks does not work, etc. enter image description here mutations.js getVehicleBrands(state, page) { var url = ‘vehiclebrands-all?page=’ + page axios.get(url).then(response => { state.vehiclebrands = response.data.vehiclebrands.data state.pagination_marca = response.data.pagination_marca }) }, web.php Route::get(‘vehiclebrands-all’, ‘[email protected]’); Error Uncaught (in promise) TypeError: Cannot read property ‘data’ of undefined at ..

Read more

سلام من از laravel و vuejs استفاده می‌کنم ولی تصاویر برای من نمایش داده نمیشود پوشه storage برای من ساخته شده و تصاویر در آن پوشه ثبت شده است. اما این تصاویر در پوشه public موجود نیست. در فایل vue کدهای من به این شکل است: تصاویر در پوشه زیر موجود است: .storageappcategories_images Sourc..

Read more

app.js require(‘./bootstrap’); window.Vue = require(‘vue’); Vue.component(‘exampleComponent1’, require(‘./components/exampleComponent1.vue’)); Vue.component(‘exampleComponent2’, require(‘./components/exampleComponent2.vue’)); const app = new Vue({ el: ‘#app’ }); from the above code, I want to pass data from exampleComponent1 to exampleComponent2 when some event has occurred in exampleComponent1. What is the optimal solution for this ?? Sourc..

Read more

require(‘./bootstrap’); window.Vue = require(‘vue’); Vue.component(‘exampleComponent1’, require(‘./components/exampleComponent1.vue’)); Vue.component(‘exampleComponent2’, require(‘./components/exampleComponent2.vue’)); const app = new Vue({ el: ‘#app’ }); from the above code, I want to pass data from exampleComponent1 to exampleComponent2 when some event has occurred in exampleComponent1. What is the optimal solution for this ?? Sourc..

Read more

I’m working with vuejs and want to submit files using axios I try to append files to FormData but it still not working The only thing I know how to do is showing the file’s name <template> <div> <div class="row"> <div class="col-lg-9 col-md-9 col-sm-12"> <div class="form-inline mb-3 pt-3"> <label for="date">Date:</label> <input type="date" name="date" id="date" min=’2020-05-08′ ..

Read more

I want to convert ag-grid table to pdf file and export it. For this reason I use "jspdf" library. But now I can’t place ag-grid table contents into my pdf. Here is my ag-grid table portion <button @click="createPDF">Download PDF</button> <div ref="content" id="pdfTable" > <ag-grid-vue ref="agGridTable" :components="components" :gridOptions="gridOptions" class="ag-theme-material w-100 my-4 ag-grid-table" :columnDefs="columnDefs" :defaultColDef="defaultColDef" :rowData="usersData" rowSelection="multiple" ..

Read more

I am using Laravel 8 Vuejs 2.17 and VueRouter 3.4, i have two components Orders.vue and Users.vue this is how my app.js looks like require("./bootstrap"); window.Vue = require("vue"); import Vue from "vue"; //? Vue router import VueRouter from "vue-router"; import routes from "./routes"; Vue.use(VueRouter); const router = new VueRouter({ routes }); new Vue({ router, }).$mount("#app"); ..

Read more

I am creating a Single Page Application using Laravel 8, Vue and Sanctum for API. If I use Jetstream for authentication there is compulsory to use another js Inertia. and according to documentation its saying "you will use Laravel’s router instead of Vue router." Can I use Jetstream without the inertia or without laravel router? ..

Read more

Taking pingcrm as an example, can a child component receive data from its corresponding controller and not only the route controller? For example, we have the routes: Route::get(‘/’, [DashboardController::class, ‘index’]) ->name(‘dashboard’) ->middleware(‘auth’) Route::get(‘contacts’, [ContactsController::class, ‘index’]) ->name(‘contacts’) ->middleware(‘remember’, ‘auth’) If I embed <Contacts /> as a child component of the Dashboard, it doesn’t receive any data ..

Read more

Backend Laravel with scout and algolia search, Lighthouse-php Below laravel grapql: products(search: String @search, orderBy: _ @orderBy(columns: ["created_at"])): [Product!]! @paginate Graphql-playground search work perfectly: products(first: 5, search: $searchText) { data { id name description } paginatorInfo { currentPage lastPage } } } Vue template need advice how to complete my code with search functionality?: <template> ..

Read more

I am using Vue Js within my Laravel project where I use it to make a POST call. It works fine however when handling the promise I am having the following issues: axios.post(‘/customer/update’,this.customer) .then(response =>( //this.customer = response.data.customer //if this line is uncommented, the scripts falls over this.error.text = response.data.message )).then(response =>( this.error.show = true ..

Read more

Take the routes out of the auth and put them in web.php, I want to send a parameter through the url for the login but it throws me an error. Route::get(‘login/{url}’, ‘[email protected]’)->name(‘login’); Route::post(‘login’, ‘[email protected]’); Route::post(‘logout’, ‘[email protected]’)->name(‘logout’); ErrorException (E_ERROR) Route [login/{url}] not defined. (View: C:wamp64wwwportalmecanico_copiaresourcesviewsauthlogin.blade.php) Previous exceptions Route [login/{url}] not defined. (0) Sourc..

Read more