Lets say I have a
IndexController
Which contains a function
public function store($store)
{
$store = (query)->get();
return $store;
}
Now I want one column from store
to be accessible to all functions like
$id = $store->id
I want it to be usable like this
public function abv()
{
$categories = (query)->where('id','=',$id)->get();
}
My point is that it becomes a global variable to the whole controller. How do I achieve this?