Tag:yii2

  • Yii modules module configuration

    Time:2022-11-25

    During the development process, in a project, the functions of the project may be divided into multiple modules. For example, if our project is a management and control system for e-commerce, then our project may be divided into a sales module and a procurement module. , financial modules, etc. At this time, if we can […]

  • In the YII2 project, rewrite the comment code for the method function in PhpStorm

    Time:2022-11-23

    1 Description The default accessible routes of Yii2 all start with action, but when there are more projects, the action name becomes longer, and it is very inconvenient to convert the upper and lower case every time to search the action globally, so we rewritten the function of phpstorm An annotation tool, so that when […]

  • The solution to the slow installation of Yii2 composer

    Time:2022-11-19

    Column content backup: https://www.bestyii.com/topic/1 It is very convenient to use composer to refer to PHP open source projects in Yii, and there are also composer plug-ins fxp-asset and Asset Packagist for referencing front-end open source projects In the past, yii used the former by default, but now the new yii2 template uses the latter by […]

  • Composer custom github repository under Yii2

    Time:2022-11-8

    Column backup: https://www.bestyii.com/topic/32There are more open source projects now. Some extensions are still dependent on each other, and sometimes there is no need to go through the package release process because of temporary changes. The solution is simple: Clone the original library, modify the code release new version Map the library in composer.json to its […]

  • The solution to the program crash and suspended animation when PhpStorm is developed using the Yii framework

    Time:2022-10-27

    when yourPhpStormin developmentYiiWhen framework related programs, some of us will enable a plug-inGithub:Yii2support, but whenPhpstormWhen this plugin is enabled, whenever our code writes::classwhen,PhpstormAll will die. In fact, the author of this plugin has solved this solution, but this version of the plugin is still a beta version, you can download it here:https://github.com/nvlad/yii2…, or download directlyyii2support-0.10.57.24.jar.zip, […]

  • Building a complete full-stack movie system from scratch (4) – authentication and authorization of restfulApi users and user registration

    Time:2022-10-19

    Set the user authentication class in the configuration file main.php, and comment out the cookies and session configuration, because the Api client is different from the WEB website, usually cookies and sessions cannot be used to maintain the login state. ‘user’ => [ ‘identityClass’ => ‘common\models\User’, ‘enableAutoLogin’ => true, ‘enableSession’ => false, //’identityCookie’ => [‘name’ […]

  • yii2 – redis deployment

    Time:2022-10-17

    Install redis, the following is 2.8, note that the redis version must be higher, the version below 2.2.7 is not acceptable, does not support php-redis, it is recommended to install the 2.8+ version wget http://download.redis.io/releases/redis-3.2.9.tar.gz tar xzf redis-3.2.9.tar.gz cd redis-3.2.9 make 2.6.14 This version is a bit old, you can find the new redis download […]

  • yii-goaop – Integrate goaop into Yii, elegant aspect-oriented programming in Yii

    Time:2022-10-17

    yii-goaop – Integrate goaop/framework into Yii, elegant aspect-oriented programming in Yii. project address https://github.com/guanguans/yii-goaop Environmental requirements Yii >= 2.0 Install $ composer require guanguans/yii-goaop -vvv composer.json add: “autoload”: { “psr-4”: { “backend\\”: “backend/”, “frontend\\”: “frontend/”, “common\\”: “common/”, “console\\”: “console/”, “app\\”: “” } } $ composer dumpautoload configure yii2-app-advanced configureconfig/main.phpAdd to the file: <?php return [ […]

  • YII2-PHP session session memcache cluster configuration scheme

    Time:2022-10-13

    question Because the session of the online PHP cluster has always used a memcache service, the service response request often has a large standard deviation, which theoretically does not occur for the same request, and the final location is the problem caused by a single memcache. . Solutions Try to use docker to simulate multiple […]