lundi 29 mai 2017

How to Call/Display Foreach Loop after Login

I had problem on calling page inside Foreach Loop.Although It is Okay before I click Login, but when I'd try to login,only the html tag where loaded and foreach loop cannot... On my HomeController extends Controller

public function index()
{
    return view('pages.welcome');
}

on where I call welcome page. and inside of it which is foreach loop.

  <div class="row">
    <div class="col-md-8">
      @foreach ($posts as $post)
            <div class="post">
              <h3></h3>
              <p>
              </p>
        <a href="" class="btn btn-primary btn-sm">Read More...</a>
            </div>
        <hr>
      @endforeach
    </div>
 </div>      

And I think the problem is my route:

Route::get('/home', 'HomeController@index');



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2rfE8pt
via IFTTT

Aucun commentaire:

Enregistrer un commentaire