vendredi 5 février 2021

How to display data from database from all categories?

Here are the first lines of code on a page I have on my site:

@extends('layouts.communities.base')

@section('page_title', $community->name)
@section('no_top_bar', true)

@section('content_title', $community->name)

@section('hero_shot')
<h1 class="text-center pt-5 pb-3"></h1>
@endsection

    @if (auth()->check())
    <div class="row">
        <div class="col-12">
            <v-post-form :user="user" :community-id="">
        </div>
    </div>
    @endif

I am using laravel 5.5.

Basically, I have a community site that shows a list of communities. If you click on a community, you will be directed to the community page. I want to change the page layout so that instead of showing a list of communities, it shows a feed of all the posts from all the communities. Any idea how to code this? Is there a way to edit and so that the server fetches posts from all communities instead of the community name that was selected?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire