In certain rare scenarios, you should create an instance of a class and call its methods directly within a Blade view, rather than from a controller. For these cases, Laravel provides the convenient @inject directive:
@inject('metrics', 'App\Services\MetricsService')
<div>
Monthly Revenue: {{ $metrics->monthlyRevenue() }}.
</div>