php - three different table in one views laravel 5.2 -


hi display 3 different table in 1 views using laravel 5.2. seems having problem on it.

my homecontroller.php

namespace app\http\controllers;  use illuminate\http\request; use db; use app\http\requests; use app\http\controllers\controller;  class homecontroller extends controller {     public function index()     {         $about = db::select('select * about');         $teams = db::select('select * teams');         $services = db::select('select * services');          return view('master', ['about' => $about], ['teams' => $teams], ['services' => $services]);     } } 

in views:

@foreach ($about $abt)       <h4>{{$abt->title}}</h4>       <span class="semi-separator center-block"></span>       <p>{{$abt->description}}</p> @endforeach  @foreach ($teams $team)      <div class="creative-symbol cs-creative">         <img src="assets/images/new/{{$team->icon}}" alt="">         <span class="semi-separator center-block"></span>         <h4><b>{{$team->title}}</b></h4>         <p>{{$team->description}}</p>      </div> @endforeach 

i cant display third 1 $services. pls me. when add third 1 display error

please change this:

        return view('master', ['about' => $about], ['teams' => $teams], ['services' => $services]); 

to this:

        return view('master', ['about' => $about, 'teams' => $teams, 'services' => $services]); 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -