public function can($args = null)
    {
        $args = is_array($args) ? $args : func_get_args();
        return call_user_func_array([$this->getCurrentAuthority(), 'can'], $args);
    }
public function can($args = null)
    {
        $args = is_array($args) ? $args : func_get_args();
        return call_user_func_array([$this->getCurrentAuthority(), 'can'], $args);
    }
public function can ( $ args = null ) { $ args = is_array ( $ args ) ? $ args : func_get_args ( ) ; return call_user_func_array ( [ $ this -> getCurrentAuthority ( ) , 'can' ] , $ args ) ; }
Use in the controller or view to check the user's permission for a given action
and object.

$this->can('destroy', $this->project);

You can also pass the class instead of an instance (if you don't have one handy).

@if (Authority::can('create', 'Project'))
{{ link_to_route('projects.create', "New Project") }}
@endif

If it's a nested resource, you can pass the parent instance in an associative array. This way it will
check conditions which reach through that association.

@if (Authority::can('create', ['Project' => $category]))
{{ link_to_route('categories.projects.create', "New Project") }}
@endif

This simply calls "can()" on the <code>$this->currentAuthority</code>. See Authority::can().
Use in the controller or view to check the user s permission for a given action and object .