$updateOrder = function ($items) {
$ids = collect($items)->pluck('value')->toArray();
Photo::whereIn('id', $ids)
->get()
->each(function ($item) use ($ids) {
$item->update(['ordering' => array_search($item->id, $ids)]);
});
This thing happends mainly due to browser or server cache
If this problem is because of browser cache then we can hardreload the browser (ctrl + f5)
if this is because of server cache then you can replace default htaccess with the htaccess provided in wordpress documentation
RewriteEngine On
For anybody new coming across this. the fix for me was a combination of things, before which the generating optimised autoload files took over 260s.
First adding : "https://packagist.org" to repositories in composer.json.
"repositories": [ { "type": "composer", "url": "https://packagist.org" } ]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ChangeEvent, | |
HTMLInputTypeAttribute, | |
useState, | |
useRef, | |
useId, | |
HTMLProps, | |
} from "react"; | |
import { mediaUrl } from "@/lib/utils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Section from "@/Components/Section"; | |
import axios from "axios"; | |
import { ReactNode, useState } from "react"; | |
import DataTable from "react-data-table-component"; | |
import { useQuery } from "react-query"; | |
import { debounce } from "lodash"; | |
import TextInput from "@/Components/TextInput"; | |
import { useQueryClient } from "react-query"; | |
import { $on } from "@/lib/utils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function () {var script=document.createElement('script');script.src="//cdn.jsdelivr.net/npm/eruda";document.body.appendChild(script); script.onload = function () { eruda.init() } })(); |