@extends('front.frontmaster') @section('content') <?php use App\OrgStruc; $orgs = OrgStruc::latest()->get(); ?> @foreach($orgs as $org ) <h2>{{$org->title}}</h2> <p>{!!$org->details!!}</p> @endforeach @endsection
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $orgs = OrgStruc::latest()->get(); return view('admin.orgstruc.index')->with('orgs', $orgs); }