P
P
Pavel Gogolinsky2015-06-24 13:41:31
Yii
Pavel Gogolinsky, 2015-06-24 13:41:31

How to debug in yii2 (specifically rbac)?

In the controller, I check if the user has the ability to edit the post.

Yii::$app->user->can('updatePost', ['model'=>$model]);

I get a negative answer, although it should be positive. How can I debug the check path can('updatePost', ['model'=>$model])? How to see what functions are called, what parameters are passed, what result is given?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kompi, 2015-06-24
@kompi

A universal option is xdebug and install the necessary watchers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question