Answers for "laravel cli read models"

PHP
0

@foreac laravel

@if(count($posts) > 1)
    @foreach($posts as $post)
        <h2><a href="/posts/{{$post->id}}">{{$post->title}}</a></h2>
    @endforeach
@else
    </p>no posts found</p>
@endif
Posted by: Guest on October-18-2020
0

@foreac laravel

public function index()
{
    $posts = Post::all();
    return view('Pages.welcome')->with('posts', $posts);
}
Posted by: Guest on October-18-2020

Browse Popular Code Answers by Language