Skip to content

Commit

Permalink
feat: add Job policy
Browse files Browse the repository at this point in the history
  • Loading branch information
geekmaros committed Sep 4, 2024
1 parent a154bcf commit c3bc42f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions app/Policies/JobPolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

namespace App\Policies;

use App\Models\Job;
use App\Models\User;

class JobPolicy
{
/**
* Determine whether the user can view any models.
*/
public function edit(User $user, Job $job): bool
{
return $job->employer->user->is($user);
}

public function viewAny(User $user): bool
{
//
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, Job $job): bool
{
//
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, Job $job): bool
{
//
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Job $job): bool
{
//
}

/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Job $job): bool
{
//
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Job $job): bool
{
//
}
}

0 comments on commit c3bc42f

Please sign in to comment.