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>jobs</th> <th>Actions</th> </tr> </thead> <tbody> <?php $records = Career::orderBy('id', 'desc')->paginate(5); foreach ($records as $record) { ?> <tr class="odd gradeX"> <td>{{ $record->title}}</td> <td>{{ $record->jobsname }}<br/>{{ $record->jobsname1 }}<br/>{{ $record->jobsname2 }}<br/>{{ $record->jobsname3 }}<br/>{{ $record->jobsname4 }}<br/>{{ $record->jobsname5 }}<br/>{{ $record->jobsname6 }}<br/>{{ $record->jobsname7 }}<br/>{{ $record->jobsname8 }}<br/>{{ $record->jobsname9 }}<br/>{{ $record->jobsname10 }}</td> <td> <div class="btn-group"> <a href="{{URL::to('dashboard/admin/alljobs/'.$record->id.'/edit')}}" class="editbtn" style="margin-top:0px; margin-left:15px;"> Edit </a> <br/><br/> <a href="{{URL::to('dashboard/admin/alljobs/'.$record->id.'/delete')}}" class="editbtn" style="margin-top:0px; margin-left:15px;"> Delete </a>