I am trying to get record against unique id from database but i am getting all the record i have 2 columns in my table and i am getting all the 2 but only want is to get 1 in my view.
My View in which i am using blade template:
<li><a href="{{url('Template'.($value->particulars1)->template)}}" class="viewpage" target="_blank"><i class="fa fa-eye"></i> View Page</a></li>
Here i am getting record based on template id as u can see $value->particulars1)->template but it is returning all 2 tables i somehow also want to get record against id(which is auto incrementing) but i am unable to get my records
My Controller:
public function Template1()
{
$template1 = Sale::all();
return view('Template-1',compact('template1'));
}
and my router:
$router->get('/Template1', 'AjaxController@Template1');
Any help will be highly appreciated!