Hi I'm having trouble getting data from database after adding a new function inside my controller. Can anyone explain to me this error and what should I do?
I'm using this video as a reference and want to do something like his end result (see 1:09:28 of video), but I get this error:
public function manageCategory() {
$this->authCheck();
$all_category = DB::table('category')->get();
$manage = view('admin.pages.manage_category')->with('data', $all_category);
return view('admin.pages.manage_category')->with('main_content', $manage);
}
<tbody>
@foreach($data as $vData)
<tr>
<td><a href="#">{{ $vData->category_id }}</a></td>
<td class="hidden-phone">{{ $vData->category_name }}</td>
<td>{{ $vData->category_description }} </td>
<td><span class="label label-important label-mini">{{ $vData->category_published }}</span></td>
<td>
<button class="btn btn-success"><i class="icon-ok"></i></button>
<button class="btn btn-primary"><i class="icon-pencil"></i></button>
<button class="btn btn-danger"><i class="icon-trash "></i></button>
</td>
</tr>
@endforeach
</tbody>
