I want to get data from a controller in my view to use in one of the div's
My TagController is like:
class TagController extends Controller
{
//
public function index(){
$tags = Tag::all();
return $tags;
}
}
My view includes the following code to access this
{{ $tags = new App\Http\Controllers\TagController,
$tags->index()
}}
->can't use the keyword use because eloquent don't allow that ->Tried to make the function static and used TagController::index() , gave error can't make function static -> can't use this controller to route and redirect with the function because the view is already linked to another controller and i don't want to reload How can I use this function from controller. Sorry for this silly thing, Please help out, I am new to laravel