How do I access the properties of the response builder?

All response builders hold properties that were assigned to them upon creation from the request. These properties are typically the arguments that would be passed to a conventional Laravel controller and subsequently used in the code within the controller.

For example on the ProductPage, the Aero\Catalog\Models\Product model for the requested URL can be accessed as follows:

\Aero\Store\Http\Responses\ProductPage::extend(function ($page) {
    $product = $page->product;

    // do things with the $product model
});

Articles in this section

Was this article helpful?
0 out of 0 found this helpful