Issue
$data = Models::all();
$new_data = $data::where('category','tree')->get();
return view('backend.view',compact('data','new_data));
can i make $data to type data by other categories?
Error Using $this when not in object context
Solution
try this
$data = Models::all();
$new_data = $data->where('category','tree');
Answered By - Bhargav Rangani
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.