mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 18:16:55 +01:00 
			
		
		
		
	 f8ad720f52
			
		
	
	
		f8ad720f52
		
			
		
	
	
	
	
		
			
			* Init * Health Page * Admin API Keys * Update API Keys * Database Hosts * Mounts * remove `s` * Users * Webhooks * Server never again... * Fix Server * Settings * Update Mounts * Update Databasehost * Update Server * Oops, Update Server * Nodes * Update User * Dashboard * Update Server * Profile * Egg * Role & Update Egg * Add base Laravel lang files * update apikey * remove html back to settings, remove comment * add `:resource` to create_action * Update Egg * Update Egg v2 * Update 1 * trans cf info label * Update charts * more trans * Update Webhook * update Health * Update Server * Update Role * Fixes * Bulk Update * AnotherOne * Fix relation button label * rename `admin1` to `admin` Leftover from testing... oops * More Translations * Updates * `pint` + Relation Manager Titles
		
			
				
	
	
		
			31 lines
		
	
	
		
			798 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			798 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Filament\Components\Tables\Actions;
 | |
| 
 | |
| use App\Models\Egg;
 | |
| use App\Services\Eggs\Sharing\EggExporterService;
 | |
| use Filament\Tables\Actions\Action;
 | |
| 
 | |
| class ExportEggAction extends Action
 | |
| {
 | |
|     public static function getDefaultName(): ?string
 | |
|     {
 | |
|         return 'export';
 | |
|     }
 | |
| 
 | |
|     protected function setUp(): void
 | |
|     {
 | |
|         parent::setUp();
 | |
| 
 | |
|         $this->label(trans('filament-actions::export.modal.actions.export.label'));
 | |
| 
 | |
|         $this->icon('tabler-download');
 | |
| 
 | |
|         $this->authorize(fn () => auth()->user()->can('export egg'));
 | |
| 
 | |
|         $this->action(fn (EggExporterService $service, Egg $egg) => response()->streamDownload(function () use ($service, $egg) {
 | |
|             echo $service->handle($egg->id);
 | |
|         }, 'egg-' . $egg->getKebabName() . '.json'));
 | |
|     }
 | |
| }
 |