/**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $banner = Banner::all();
     View::share('selected_option', 'Agregar Banner');
     return View::make('banner.add')->with('banner', $banner);
 }
 public function Index()
 {
     //
     $banner = Banner::all();
     return View::make('views/index')->with("banner", $banner);
 }
Exemplo n.º 3
0
'>更多關於宙思 »</a>
</nav>

<article class='b1'>
  <div class='l'>
    <div>web design</div>
    <div>graphic design</div>
    <div>photography</div>
    <div>design project</div>
    <p>宙思設計團隊,服務廣泛,凡舉網頁、平面、包裝、印刷及攝影皆可製作。</p>
    <p>我們擁有各領域的人才,希望能將您的需求,以最完整的服務與最精湛的設計呈現給您。</p>
  </div>
  <div class='r'>
    <div id='banners'>
<?php 
foreach (Banner::all(array('order' => 'sort DESC', 'conditions' => array('is_enabled = ?', Banner::ENABLE_YES))) as $banner) {
    ?>
        <figure>
          <img src='<?php 
    echo $banner->cover->url('800w');
    ?>
' alt='<?php 
    echo $banner->title;
    ?>
' />
          <figcaption>
            <h3><?php 
    echo $banner->title;
    ?>
</h3>
            <p><?php