Laravel mix __webpack_require__

I’m using Laravel 5.8 I’m working on a SPA with VueJs, Problem with some dependency here is the error while open some page My package.json dependency is “dependencies”: { “@riophae/vue-treeselect”: “^0.2.0”, “axios”: “^0.18”, “buefy”: “^0.7.8”, “bulma”: “^0.7.5”, “vee-validate”: “^2.2.11”, “vue”: “^2.5.17”, “vue-awesome-swiper”: “^3.1.3”, “vue-router”: “^3.1.3” } My package.json devDependency is devDependencies: “browser-sync”: “^2.26.7”, “cross-env”: “^5.2.0”,…

Foreach loop only returns the latest result from a query in laravel

I want to loop through a collection and do a query for each item of this collection but the foreach loop only returns the latest result. How can I solve this problem? foreach ($conversations as $conversation) { if ($conversation->id_participant1 !== Auth::user()->id) { $users = User::where(function ($query) use ($conversation) { $query->where(‘id’, $conversation->id_participant1); }) ->get(); } else…

Laravel Nova: Datetime with format and pickerFormat combined does not work

I got the fallowing date time field: DateTime ::make(‘foobar’) ->format(‘DD-MM-YYYY HH:mm:ss’) // https://momentjs.com/docs/#/parsing/string-format/ ->pickerFormat(‘d-m-Y H:i:S’) // https://flatpickr.js.org/formatting/ ->rules(‘required’, ‘date_format:Y-m-d H:i:s’) ->firstDayOfWeek(1) Momentjs does not recognise the date. I get a warning after changing the date in console: Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to…

Laravel : How to pass one variable of one model for different queries to view and how to access it in view

I am learning laravel. I am confused at one point. I have one model Trader which has one to one relationship with two other models AgriculturalProduceMarketCommettee and CategoryMaster. traders table has apmc_id and category_id as foreign keys. Now I want to show traders_name, apmc_branch_name, category_name in one table. Trader Model <?php namespace App; use Illuminate\Database\Eloquent\Model;…

Laravel 6 – `Undefined variable: value` only error in the first time

In the first time I want to save data to database from table this error appear. ErrorException Undefined variable: value so I have to manually input the data from tinker or mysql My Controller public function store(Request $request) { $validateData = $request->validate([ ‘name_device_type’ => ‘required|max:255’, ‘signature’ => ‘Nullable’ ]); $id = DeviceType::getidDeviceTypes(); foreach ($id as…

Populate chart data in laravel using vue axios and fusioncharts

I want to populate my charts using the data from the database with axios. Im new to front-end and vue. The documentations for me is very tricky for now. Thats why ask this question here. I am not familiar with the syntax of charts yet. Graph.vue <template> <div> <div id=”chart-container”> <fusioncharts :type=”type” :width=”width” :height=”height” :dataFormat=”dataFormat”…