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,66 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreResumeRequest;
use App\Http\Requests\UpdateResumeRequest;
use App\Models\Resume;
class ResumeController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(StoreResumeRequest $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Resume $resume)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Resume $resume)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdateResumeRequest $request, Resume $resume)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Resume $resume)
{
//
}
}

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',
];
}
}