Created Resume model
Some checks failed
linter / quality (push) Successful in 3m0s
tests / ci (push) Failing after 6m19s

This commit is contained in:
2025-08-15 19:17:39 +02:00
parent 0eaf20efa7
commit e3444ef799
9 changed files with 285 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Requests;
use App\Models\Resume;
use Illuminate\Foundation\Http\FormRequest;
class StoreResumeRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return $this->user()->can('create', Resume::class);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return UpdateResumeRequest::rules();
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests;
use App\Models\Resume;
use App\Policies\ResumePolicy;
use Illuminate\Foundation\Http\FormRequest;
class UpdateResumeRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return $this->user()->can('update', $this->resume);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => 'required|string|max:255',
'creator_id' => 'required|exists:users,id',
];
}
}