yiinjz

yiinjz

www.aipanshi.com

  • 财富值330
  • 威望值0
  • 总积分540

个人信息

  • 赞了评论

    上面为模型部分

    <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,
        ]);
    }
    

    控制器部分

  • 亲,您一个java的项目,拿到yii社区来推广,有点惆怅吧

  • 2016-04-22 已签到
    连续签到1天,获得了5个金钱
  • [root 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.
    

    这个包是不是该更新了还是我的环境有问题啊

  • 2015-12-29 已签到
    连续签到1天,获得了5个金钱
  • 2015-12-11 已签到
    连续签到1天,获得了5个金钱
  • 2015-12-07 已签到
    连续签到1天,获得了5个金钱
  • 2015-12-01 已签到
    连续签到2天,获得了10个金钱
  • 大赞;最近刚好在看这块东西

  • 2015-11-30 已签到
    连续签到1天,获得了5个金钱
主管 等级规则
540/1000
资料完整度
40/100
用户活跃度
0/100

Ta的关注

11

Ta的粉丝

5

Ta的访客

11