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
export default { | |
methods: { | |
handleAjaxError(err) { | |
let errorText = err.response.data.message; | |
if (err.response.status === 422) { | |
errorText = this.convertLaravelErrorBagToString(err.response.data.errors); | |
} | |
// Here errorText variable should be ready to show all the error message in a string format, | |
// which I could simply display it. |
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
<?php | |
$vat = 0.20; | |
$transactions = Transaction::get(); | |
foreach ($transactions->chunk(5000) as $chunk) { | |
$cases = []; | |
$ids = []; | |
$params = []; | |
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
<?php | |
$transactionIds = Transaction::pluck('id'); // +100k transaction ids | |
$maxAtOneTime = 5000; | |
$total = count($transactionIds); | |
$pages = ceil($total / $maxAtOneTime); | |
$transactions = collect(); |
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
<?php | |
use Laravel\Horizon\Contracts\JobRepository; | |
use Laravel\Horizon\Jobs\RetryFailedJob; | |
class RetryFailedJobsViaHorizon extends Command | |
{ | |
protected $signature = 'horizon:retry-failed-jobs'; | |
protected $description = 'Retry failed jobs via horizon'; |
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 'vite/dynamic-import-polyfill'; | |
import '../css/app.css'; | |
import { createApp, h } from 'vue' | |
import { App, plugin } from '@inertiajs/inertia-vue3' | |
let asyncViews = () => { | |
return import.meta.glob('./Pages/**/*.vue'); | |
} | |
const app = createApp({ |