Just before the view is rendered, the composer's compose method is called with the IlluminateContractsViewView instance. You may use the with method to bind data to the view.
Note: All view composers are resolved via the service container, so you may type-hint any dependencies you need within a composer's constructor.