public function getGuest() { $users = DB::table('property')->orderBy('id', 'desc')->take(10)->get(); $latestnews = Slide::orderBy('id', 'desc')->take(5)->get(); $latestjobs = Career::orderBy('id', 'desc')->take(5)->get(); return View::make('dashboard.guest')->with('users', $users)->with('latestnews', $latestnews)->with('latestjobs', $latestjobs); }
<h2 style="color:#50b1a8; margin-bottom:10px; margin-left:0; padding-left:0;">Total News </h2> <table width="100%" cellpadding="5" cellspacing="0" border="0" class="table table-hover table-bordered margin-top15" id="companies" style="margin-bottom:15px;"> <thead> <tr> <th>Title</th> <th>Description</th> <th>Actions</th> </tr> </thead> <tbody> <?php $records = Slide::orderBy('id', 'desc')->paginate(5); foreach ($records as $record) { ?> <tr class="odd gradeX"> <td>{{ $record->title}}</td> <td>{{ $record->description }}</td> <td> <div class="btn-group"> <a href="{{URL::to('dashboard/admin/latestnews/'.$record->id.'/edit')}}" class="editbtn" style="margin-top:0px; margin-left:15px;"> Edit </a> <br/><br/> <a href="{{URL::to('dashboard/admin/latestnews/'.$record->id.'/delete')}}" class="editbtn" style="margin-top:0px; margin-left:15px;"> Delete </a>