for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Transmissor\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
use App\Models\User;
use App\Models\Topic;
class TopicPolicy
{
use HandlesAuthorization;
public function show_draft(User $user, Topic $topic)
return $user->may('manage_topics') || $topic->user_id == $user->id;
}
public function update(User $user, Topic $topic)
public function delete(User $user, Topic $topic)
public function recommend(User $user, Topic $topic)
$topic
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return $user->may('manage_topics');
public function wiki(User $user, Topic $topic)
public function pin(User $user, Topic $topic)
public function sink(User $user, Topic $topic)
public function append(User $user, Topic $topic)
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.