yiinjz
- yiinjz 赞了评论
上面为模型部分
<div class="row"> <div class="col-sm-12 col-md-6"> <?php if($prev){ ?> <a href="<?= Yii::$app->urlManager->createUrl(['sites/view','id'=>$prev->id]); ?>">上一篇: <?= $prev->sitename; ?> </a> <?php }else{ echo "暂无";} ?> </div> <div class="col-sm-12 col-md-6"> <?php // var_dump($next);?> <?php if($next){ ?> <a href="<?= Yii::$app->urlManager->createUrl(['sites/view','id'=>$next->id]); ?>"> 下一篇:<?= $next->sitename; ?> </a> <?php }else{ echo "暂无";} ?> </div> </div>
视图部分
public function actionView($id) { $model=$this->findModel($id); $prev = $model->getPrev(); $next = $model->getNext(); return $this->render('view', [ 'model' => $this->findModel($id), 'prev' => $prev, 'next' => $next, ]); }
控制器部分
- yiinjz 评论了源码 因酷教育:浅谈开源软件优势
亲,您一个java的项目,拿到yii社区来推广,有点惆怅吧
- yiinjz 2016-04-22 已签到连续签到1天,获得了5个金钱
- yiinjz 评论了源码 MoBlog一个基于Yii2的博客系统
[root@localhost moblog]# composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package npm-asset/bootstrap-markdown could not be found in any version, there may be a typo in the package name. Problem 2 - The requested package npm-asset/markdown could not be found in any version, there may be a typo in the package name. Problem 3 - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.4 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found. - Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7]. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
这个包是不是该更新了还是我的环境有问题啊
- yiinjz 2015-12-29 已签到连续签到1天,获得了5个金钱
- yiinjz 2015-12-11 已签到连续签到1天,获得了5个金钱
- yiinjz 2015-12-07 已签到连续签到1天,获得了5个金钱
- yiinjz 2015-12-01 已签到连续签到2天,获得了10个金钱
- yiinjz 评论了源码 PHP MVC 实现原理简单代码
大赞;最近刚好在看这块东西
- yiinjz 2015-11-30 已签到连续签到1天,获得了5个金钱