How can I defined two same URI that have two difference method to be called ? For example :
'owners/<user_id:\d+>/pets' => 'pets/index', //using GET
'owners/<user_id:\d+>/pets' => 'pets/create',//using POST
I try this code below :
'GET owners/<user_id:\d+>/pets' => 'pets/index',
'POST owners/<user_id:\d+>/pets' => 'pets/create',
but my problem is that if I have this code It always display 404 not found instead of 405?
Note that I already added this on my behaviors :
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'index' => ['get'],
'create' => ['post'],
],
],