797 results
Sorted by relevance
Admin / Resource Lists
How do I create a custom resource list?
To create a resource list you need a normal Laravel controller and a class that extends
Aero\Admin\ResourceListsAbstractResourceList.
class OrdersResourceList extends \Aero\Admin\ResourceLists\AbstractResourceList
{
//
}
Your controller should be like this...
Admin / Resource Lists
How do I add a column to an existing resource list?
You can use the
addColumn() method(s) to add a column to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
// Add it as the first column
$lis...
Admin / Resource Lists
How do I add a filter to an existing resource list?
You can use the
addFilter() method to add a filter to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
$list->addFilter(\Aero\Admin\Filters\Orde...
Admin / Resource Lists
How do I add a sort by to an existing resource list?
You can use the
addSortBy() method to add a filter to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
$list->addSortBy(\Aero\Admin\ResourceList...
Admin / Resource Lists
How do I add a bulk action to an existing resource list?
\Aero\Admin\BulkAction::create(
\Aero\Admin\BulkActions\DeleteProductsBulkAction::class,
\Aero\Admin\ResourceLists\ProductsResourceList::class
)
->title('Delete products')
->permissions('products.delete')
->confirm();
See here for how to create a custom b...
Admin / Resource Lists
How do I create a custom bulk action?
You can create a class that extends
\Aero\Admin\BulkActions\BulkActionJob and implement a
handle method:
class DeleteProductsBulkAction extends \Aero\Admin\BulkActions\BulkActionJob
implements \Illuminate\Contracts\Queue\ShouldQueue
{
protected $list...
General
Response Builders
General / Response Builders
What are the available response builders?
Storefront
Listed below are all the storefront response builders, the vast majority are view page responses or cart action responses:
Aero\Store\Http\Responses\AccountOverviewPage
Aero\Store\Http\Response\CartDiscountCodeApply
Aero\Store\Http\Response\CartDisc...
General / Response Builders
How do I pass data to a response?
The most common task performed when extending responses, is setting additional data. Typically, for HTML responses that render from a view, this involves sending data to the view to be used as a variable. If the response returns JSON, it may be adding addition...
General / Response Builders
How do I redirect a response?
Sometimes you may wish to redirect the user to another location, either to an external site or within the store. To do so, pass the URL,
route(), or an
Illuminate\Http\RedirectResponse instance to the
setRedirect() method.
For example, if you stored the age...
General / Response Builders
How do I set the response status code?
There may be situations where the HTTP response status needs to be altered. By default, the returned status is
200, however, this can be changed by passing the new status code to the
setStatus() method:
\Aero\Store\Http\Responses\ProductPage::extend(function...
General / Response Builders
How do I set response headers?
When extending the response builder, you can set HTTP headers to be sent with the response:
\Aero\Store\Http\Responses\ProductPage::extend(function ($page) {
$page->setHeader('foo', 'bar');
});
General / Response Builders
How do I attach middleware to a response builder?
Since Aero does not expose the underlying routes and controllers, middleware can be attached directly to the response builder. This allows for code to be executed before the main pipeline is run.
For example, to restrict all products from being accessible to g...
General / Response Builders
How do I change the response view?
For responses that return HTML, a Twig view file is used. Whilst these are originally defined, the view can be changed. For example, to change the product page view based on product data:
\Aero\Store\Http\Responses\ProductPage::extend(function (\Aero\Store\Htt...
General
Pipelines
General
Requests
General / Pipelines
What are the available pipelines?
Pipeline
Description
\Aero\Store\Pipelines\ContentForBody
Builds content string to be injected into the body of all pages.
\Aero\Store\Pipelines\ContentForHead
Builds content string to be injected into the head of all pages.
\Aero\Store\Pipelines\RobotsTxt
Use...
General / Pipelines
How do I extend pipelines?
The payload data can be altered using the
extend() method. This is typically done from within a Service Provider:
If the code is unique to a particular store it could be placed in the
boot() method of the
AppServiceProvider.
If it is to be included as part ...