Chore: Upgrade to Laravel 12 + remove Mary and Jetstream dependencies (#141)
* docs: remove requirement for setting APP_KEY manually * optimize date picker * clean up modals * spot light working * reorganization * add lazy load * wip * remove filament * styling
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use App\Exports\BackupExport;
|
||||
use App\Traits\Toast;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Livewire\Volt\Component;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
new class extends Component
|
||||
{
|
||||
use Toast;
|
||||
|
||||
// props
|
||||
|
||||
// methods
|
||||
public function export()
|
||||
{
|
||||
if (! RateLimiter::attempt('export:'.auth()->user()->id, $perMinute = 3, fn () => null)) {
|
||||
|
||||
$this->error(__('Hang on! You\'re doing that too much.'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return Excel::download(new BackupExport, now()->format('Y_m_d').'_investbrain_backup.xlsx');
|
||||
}
|
||||
}; ?>
|
||||
|
||||
<div>
|
||||
<x-ui.button type="submit" @click="$wire.export" spinner="export">
|
||||
{{ __('Download Export') }}
|
||||
</x-ui.button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user