本文整理汇总了PHP中app\User::owns方法的典型用法代码示例。如果您正苦于以下问题:PHP User::owns方法的具体用法?PHP User::owns怎么用?PHP User::owns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\User
的用法示例。
在下文中一共展示了User::owns方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete(User $user, Message $message)
{
if ($message->type) {
return $user->owns($message);
} else {
if ($user->id == $message->receiver_id) {
return true;
}
}
return false;
}
示例2: update
public function update(User $user, Post $post)
{
return $user->owns($post);
}
示例3: update
public function update(User $user, Message $message)
{
return $user->owns($message);
}
示例4: delete
public function delete(User $user, Transaction $transaction)
{
return $user->owns($transaction->customer);
}
示例5: edit
public function edit(User $user, Article $article)
{
//return $user->id == $article->user_id;
return $user->owns($article);
}
示例6: destroy
/**
* Determine if the given user can be deleted by the user.
*
* @param \App\User $user
* @param \App\User $target_user
* @return bool
*/
public function destroy(User $user, User $target_user)
{
return $user->owns($target_user);
}
示例7: show
public function show(User $user, Profile $profile)
{
return $user->owns($profile);
}
示例8: update
public function update(User $user, Quest $quest)
{
return $user->owns($quest);
}
示例9: update
public function update(User $user, Article $article)
{
return $user->owns($article);
}
示例10: withdraw
public function withdraw(User $user, Project $project)
{
return $user->owns($project);
}
示例11: delete
public function delete(User $user, Customer $customer)
{
return $user->owns($customer);
}
示例12: delete
public function delete(User $user, AmazonProduct $customer)
{
return $user->owns($customer);
}