摘要:
添加use yii\helpers\Url;view中的连接//post为你的当前控制器名,index为view模版 阅读全文
摘要:
yii2判断数据是否存在$exists = ModelName::find()->where([ 'column_name' => $value])->andWhere(['column_name' => $value])->exists(); 阅读全文
摘要:
出现400错误是yii2.0的csrf防范策略导致在components里面添加request配置如下:'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required ... 阅读全文