Hi,
I have created an extension, but i dont know how Yii2 can autload it when i try use:
https://packagist.org/packages/prsolucoes/web-response
Controller example:
<?php
namespace app\controllers;
use com\prsolucoes\WebResponse;
use Yii;
use yii\web\Controller;
class TestController extends Controller
{
public function actionIndex()
{
$response = new WebResponse();
$response->setSuccess(true);
return $response;
}
}
Add to you "composer.json", on "require" tag:
If i copy to my "app\models" folder, it work. So i think that Yii2 cannot find it when i try import from "vendor" path.
Can anyone help me?