Category : javascript

i´m traying to upload one video with dropzone and laravel, but when y select other type dropzone upload file ok and don´t return error and i need that only accept video type and if i select other type return a message. my actual code is: var var15671147011688676454ble = ”; @if(isset($restaurant) && $restaurant->hasMedia(‘video’)) var15671147011688676454ble = { ..

Read more

I’m trying to use select2 retrieving large data in my dropdown. Getting 500 Internal Server Error in my console log. I have store token in HTML meta tag. <meta name="csrf-token" content="{{ csrf_token() }}"> And sending a token as a parameter in my POST request. var CSRF_TOKEN = $(‘meta[name=”csrf-token”]’).attr(‘content’); $(document).ready(function(){ $( “#test” ).select2({ ajax: { url: ..

Read more

Index.blade.php <!– START: modal[AllData]–> <div class="modal fade" id="getTransferOperationData" role="dialog"> <div class="modal__content modal__content–xl p-10 text-left" style="width: auto; margin: 15px;"> <button type="button" class="btn btn-default close" data-dismiss="modal" aria-label="Close" style="float: right; /*border: 1px solid #ccc*/"> <span style="font-weight:bold; color: red">Kapat</span> </button> <div class="mt-20"> <p> ….. </p> </div> </div> </div> <!– END: modal[AllData]–> I want to show all data on modal ..

Read more

In MVC project, based on laravel 5.2, for preserving values (not keys) in select2 dropdown select we trigger this controller when we’re looking for the SSP term: public function get_ssp(Request $request) { $term = $request->get(‘term’); $ssp_list = SspCompanyList::where(‘ssp_company_name’, ‘LIKE’, ‘%’. $term[‘term’] .’%’) ->get([‘ssp_company_id as id’, ‘ssp_company_name as text’]); return [‘results’ => $ssp_list]; } And then ..

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

This are my tailwindcss errors: npm WARN @tailwindcss/[email protected] requires a peer of [email protected]^1.0 but none is installed. You must install peer dependencies yourself. npm WARN @tailwindcss/[email protected] requires a peer of [email protected]^1.5.0 but none is installed. You must install peer dependencies yourself. npm WARN @tailwindcss/[email protected] requires a peer of [email protected]^1.8.3 but none is installed. You must ..

Read more

I have the following form in the view: <form class="form-inline" method="POST" action="{{route(‘dsp.report’)}}"> @csrf <!– {{ csrf_field() }} –> <div class="col-sm-2 form-group"> <label>Range one: </label><input type="text" class="form-control" id="date_from" name="date_from" placeholder="Date from range"> </div> <div class="col-sm-2 form-group"> <label>Range two: </label><input type="text" class="form-control" id="date_to" name="date_to" placeholder="Date to range"> </div> <div class="col-sm-2 form-group"> <label>Filter by SSP: </label><select name="ssp_id[]" id="ssp" ..

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

I’m trying to send data to controller using ajax and I’m getting The POST method is not supported for this route. Supported methods: GET, HEAD. Can someone please tell me what am I doing wrong? In web.php Route::post(‘/fb’, ‘[email protected]’)->name(‘fb’); HTML: <form method="POST" id="formfb" enctype="multipart/form-data" data-route="{{ route(‘fb’) }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <button id="fbbutton" ..

Read more

I have this js code: var my_elem = document.querySelector("[action=’/cart/add’]"); but I need to make it a string, so I can use it as a string variable. How I can do that? I already tried: ‘var my_elem = document.querySelector("[action=’/cart/add’]");’ but I got an error: syntax error, unexpected ‘"’) === true) {‘ (T_CONSTANT_ENCAPSED_STRING) Sourc..

Read more

Hey guys i work with laravel and im trying to change the default large size pizza price to small price when click on dropdown item. Ive tried something but couldnt figure it out. Html code: @foreach($product as $p) <div class="col-lg-3 text-center portfolio-item {{$p->category_id}} "> <div class="card bg-transparent " style="width: 14rem;"> <img class="card-img-top" src="{{asset(‘front/’)}}/assets/img/1.png" alt="Card image ..

Read more

In my web application, there are two roles Customers (who visit all pages except managing/admin part) Admin/Manager (who manage products, sells, store etc) So their front end designs are different and js/css as well. When url is http://127.0.0.1 it goes to Route::get(‘/{path?}’,function(){ return view(‘app’); }); where I added the link of css js links to ..

Read more