Skip to content
Permalink
Browse files
Policy Update
  • Loading branch information
ivanovn committed Feb 13, 2021
1 parent 5d42bf7 commit c10840ad96e3ccb6c635a855d429100866f9f11b
Showing 1 changed file with 28 additions and 0 deletions.
@@ -0,0 +1,28 @@
<?php

namespace App\Policies;

use App\Models\User;
use App\Models\Profile;
use Illuminate\Auth\Access\HandlesAuthorization;

class ProfilePolicy
{
use HandlesAuthorization;

/**
* Create a new policy instance.
*
* @return void
*/

public function edit(User $user, Profile $profile)
{
return $user->id === $profile->user_id;
}

public function update(User $user, Profile $profile)
{
return $user->id === $profile->user_id;
}
}

0 comments on commit c10840a

Please sign in to comment.