Oct 19, 2024
0
Level 1
Yajra datatable export not working
I am using yajra in laravel 11. I am following their documentation. https://yajrabox.com/docs/laravel-datatables/11.0/exports-options
@extends('dashboard.app')
@section('content')
@section('breadcrumb-url', route('admin.branches.index'))
@section('breadcrumb-title', 'Branches')
@section('breadcrumb-subtitle', 'List')
<div class="col-lg-12 grid-margin stretch-card">
<div class="card">
<div class="card-body">
<livewire:export-button :table-id="$dataTable->getTableId()" />
<div class="d-flex justify-content-end">
<a href="{{route('admin.branch.create')}}" class="btn btn-success btn-fw"> Add +</a>
</div>
{{ $dataTable->table() }}
</div>
</div>
</div>
@endsection
@push('scripts')
{{ $dataTable->scripts(attributes: ['type' => 'module']) }}
@endpush
<livewire:export-button :table-id="$dataTable->getTableId()" />
this is working fine and it is exporting file as xlsx but i want a csv file
when i do the following
<livewire:export-button :table-id="$dataTable->getTableId()" type="csv" />
League\Flysystem\UnableToRetrieveMetadata
Unable to retrieve the file_size for file at location: 9d481eba-c968-4daa-9f66-1c0a00c16072.csv.
i get this error. can anyone help me this error and explain me what's wrong.
Note: i already ran storage:link
Please or to participate in this conversation.