mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-01 00:46:52 +01:00 
			
		
		
		
	 da195fd2fe
			
		
	
	
		da195fd2fe
		
			
		
	
	
	
	
		
			
			* Not found property rule * Make these “better” * Day 1 * Day 2 * Day 3 * Dat 4 * Remove disabled check * Day 4 continued * Run pint * Final changes hopefully * Pint fixes * Fix again * Reset these * Update app/Filament/Admin/Pages/Health.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> * Update app/Traits/CheckMigrationsTrait.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --------- Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			930 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			930 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Http\Controllers\Api\Application\Servers;
 | |
| 
 | |
| use App\Models\Server;
 | |
| use App\Transformers\Api\Application\ServerTransformer;
 | |
| use App\Http\Controllers\Api\Application\ApplicationApiController;
 | |
| use App\Http\Requests\Api\Application\Servers\GetExternalServerRequest;
 | |
| use Dedoc\Scramble\Attributes\Group;
 | |
| 
 | |
| #[Group('Server', weight: 1)]
 | |
| class ExternalServerController extends ApplicationApiController
 | |
| {
 | |
|     /**
 | |
|      * View server (external id)
 | |
|      *
 | |
|      * Retrieve a specific server from the database using its external ID.
 | |
|      *
 | |
|      * @return array<array-key, mixed>
 | |
|      */
 | |
|     public function index(GetExternalServerRequest $request, string $external_id): array
 | |
|     {
 | |
|         $server = Server::query()->where('external_id', $external_id)->firstOrFail();
 | |
| 
 | |
|         return $this->fractal->item($server)
 | |
|             ->transformWith($this->getTransformer(ServerTransformer::class))
 | |
|             ->toArray();
 | |
|     }
 | |
| }
 |