小编uvi*_*ere的帖子

将变量值从一个控制器传递到另一个控制器 laravel

我是 Laravel 的新手。我有两个控制器,其功能为 1> CartController@finalizeCart 和 2> PaymentController@postPayment。现在,我想将变量 TotalPrice从 <1> 传递到 <2>。我的问题是:如何将值从一个控制器直接传递到另一个控制器?

php laravel-4

2
推荐指数
1
解决办法
3926
查看次数

如何在wordpress的帖子中添加缩略图?

我想在首页的帖子中添加缩略图.但不知道该怎么做.我的主题不支持custom_field.其中一个类别的代码是我粘贴在这里.......

        <div class="featured">
        <h2>HEADLINES</h2>

            <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "thumbnail". Recommended image size is 70x70, as the stylesheet is written for this size.-->

            <?php $recent = new WP_Query("cat=3&showposts=3");  
          while($recent->have_posts()) : $recent->the_post();?>
        <?php the_post_thumbnail(); ?>

     <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
                <a href="<?php the_post_thumbnail() ?>" rel="bookmark"><imgstyle="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="alt text" /></a>
            <?php else: ?>
                <a href="<?php …
Run Code Online (Sandbox Code Playgroud)

php wordpress wordpress-theming wordpress-plugin

1
推荐指数
1
解决办法
421
查看次数