 b1f99ca8a3
			
		
	
	
		b1f99ca8a3
		
			
		
	
	
	
	
		
			
			* add application api endpoints for mounts * run pint * add mounts resource to api key * add includes to mount transformer * forgot delete route for mount itself * add migration for "r_mounts" column * add mounts to testcase api key
		
			
				
	
	
		
			21 lines
		
	
	
		
			527 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			527 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Http\Requests\Api\Application\Mounts;
 | |
| 
 | |
| use App\Models\Mount;
 | |
| 
 | |
| class UpdateMountRequest extends StoreMountRequest
 | |
| {
 | |
|     /**
 | |
|      * Apply validation rules to this request. Uses the parent class rules()
 | |
|      * function but passes in the rules for updating rather than creating.
 | |
|      */
 | |
|     public function rules(array $rules = null): array
 | |
|     {
 | |
|         /** @var Mount $mount */
 | |
|         $mount = $this->route()->parameter('mount');
 | |
| 
 | |
|         return parent::rules(Mount::getRulesForUpdate($mount->id));
 | |
|     }
 | |
| }
 |