title: Create custom action in Yii2 Rest API
body: <p>I am working with yii2 , and I want to create rest api. I read yii2 rest api quick start documentation, but in there you can use only default actions(index/view/create/delete/list...). It is working fine</p>
  
  <p>But I want to create another action for example </p>
  
  <pre><code>public function actionPurchasedcard(){
       //some code
  }
  </code></pre>
  
  <p>But I couldn't it. Help me please, how to create custome action in yii2 Rest api.</p>
  
  <p>config.php</p>
  
  <pre><code>'urlManager' =&gt; [
      'enablePrettyUrl' =&gt; true,
      'enableStrictParsing' =&gt; true,
      'showScriptName' =&gt; false,
      'rules' =&gt; [
          [
              'class'=&gt;'yii\rest\UrlRule',
              'controller'=&gt;[
                  'v1/resource',
              ]
          ],
      ]
  ]
  </code></pre>
  
  <p>document root:</p>
  
  <pre><code>htdocs/myapi/api/web/
  </code></pre>
  
  <p>I am calling like this :
  <a href="http://myapi/v1/resource/purchasedcard" rel="noreferrer">http://myapi/v1/resource/purchasedcard</a></p>
  
  <p>Thanks.(sorry my english not good)</p>