skip to Main Content

Laravel – How can I fix the validation error when adding a file?

I work with laravel and cms orchid. Why a validation error occurs when adding a file via the upload component. Layout::rows([ Select::make('user_id') ->value($this->orders->user_id) ->fromModel(User::class, 'familia'), Upload::make('file')->maxFiles(1)->maxFileSize(50) ->title('Файл для вывода')->acceptedFiles('.pdf,.doc,.docx,.txt'), ]); Message of error: Validation error. File upload error. Code php.ini…

VIEW QUESTION

Implement multiple currencies converter in Laravel

I'm trying to implement currency converter in laravel using torann/currency package https://lyften.com/projects/laravel-currency/doc/ installed this package composer require torann/currency publish the package php artisan vendor:publish --provider="TorannCurrencyCurrencyServiceProvider" --tag=config php artisan vendor:publish --provider="TorannCurrencyCurrencyServiceProvider" --tag=migrations then run migration php artisan migrate i have to…

VIEW QUESTION

Missing required parameter for update route laravel 11

I have an error Missing required parameter for [Route: updatetransaksi] [URI: penjualan/update/{id}] [Missing parameter: id]. web code route::get('/penjualan/edit/{id_penjualan}', [PenjualanController::class, 'edit']); route::post('/penjualan/update/{id}', [PenjualanController::class, 'update'])->name('updatetransaksi'); controller code public function edit(string $id_penjualan) { $penjualan = Penjualan::where('id_penjualan', $id_penjualan)->first(); $penjualan = DetailPenjualan::with('Penjualan', 'Barang')->where('id_penjualan', $id_penjualan)->get(); $penjualanData…

VIEW QUESTION

LARAVEL orderBy DESC not working while using groupBy

I would like to use orderBy in laravel but its not working while I have used CAST there $this->adLists = ListingVisitor::with('listing')->selectRaw('CAST(sum(amount) as UNSIGNED) as total,listing_id,amount')->whereHas('listing.user',function($q){ $q->where('id',Auth::user()->id); })->groupBy('listing_id')->orderBy('total','DESC')->paginate(10); The result would be 136, 66, 1 ,5 Its actually should be 136,…

VIEW QUESTION
Back To Top
Search