* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * lint fixes * missing empty lines * translations * fix vue version * #134 - fixes * fix * fix * #134 - fix * fix * fix * #134 - added tests * #134 - fix to translations * #134 - tests * #134 - fix * Update database/factories/ResumeFactory.php Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com> * #134 - fix * #134 - fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl> Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			571 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			571 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
declare(strict_types=1);
 | 
						|
 | 
						|
namespace Toby\Infrastructure\Http\Requests;
 | 
						|
 | 
						|
use Illuminate\Foundation\Http\FormRequest;
 | 
						|
use Illuminate\Validation\Rule;
 | 
						|
 | 
						|
class TechnologyRequest extends FormRequest
 | 
						|
{
 | 
						|
    public function rules(): array
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            "name" => [
 | 
						|
                "required",
 | 
						|
                Rule::unique("technologies", "name")->ignore($this->technology),
 | 
						|
                "max:255",
 | 
						|
            ],
 | 
						|
        ];
 | 
						|
    }
 | 
						|
 | 
						|
    public function data(): array
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            "name" => $this->get("name"),
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |