- directory refactor
This commit is contained in:
		
							
								
								
									
										22
									
								
								app/Infrastructure/Http/Resources/VacationLimitResource.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/Infrastructure/Http/Resources/VacationLimitResource.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace Toby\Infrastructure\Http\Resources;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Http\Resources\Json\JsonResource;
 | 
			
		||||
 | 
			
		||||
class VacationLimitResource extends JsonResource
 | 
			
		||||
{
 | 
			
		||||
    public static $wrap = null;
 | 
			
		||||
 | 
			
		||||
    public function toArray($request): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            "id" => $this->id,
 | 
			
		||||
            "user" => new UserResource($this->user),
 | 
			
		||||
            "hasVacation" => $this->hasVacation(),
 | 
			
		||||
            "days" => $this->days,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user