797 results
Sorted by relevance
Admin / Permissions
How do I check for permissions?
Blade
@can('acme.view')
...
@endcan
@canany(['acme.add', 'acme.edit'])
...
@endcan
Routes
Route::get('/acme', [AcmeController::class, 'index'])
->name('admin.modules.acme')
->middleware('can:acme.view');
Controllers
if ($this->can('acme.view'))...
Book
General
General
Commands
General / Commands
What are the available commands?
php artisan make:module
This command scaffolds a module for you (you need to provide a valid name for the module such as
aerocargo/my-module). This involves setting up composer and publishing some default module stubs.
php artisan aero:configure
This command ...
Setup
Laravel
Setup / Laravel
What is Laravel?
The Aero platform is built using the Laravel PHP framework.
Laravel is a free, open-source PHP web framework designed to make building scalable web applications easier and faster by providing pre-built components and structure.
Before developing with Aero, we ...
Search / Listings
How can I add custom attributes to the listing model?
You can extend the
\Aero\Search\Elastic\Pipelines\ListingAttributes pipeline to add custom attributes to the listing model.
For example you can modify the listing's name to include the attributes when the listing is split by them.
\Aero\Search\Elastic\Pipelin...
Search / Listings
How can I add a custom facet?
You can add a custom facet by extending the listing document.
For example you can add a Stock Status facet:
\Aero\Search\Elastic\Documents\ListingDocument::add('string-facets', function ($document) {
$stock = $document->getModel()->availableStock() > 0;
...
Search / Listings
How can I pre-filter listings?
There may be occasions where you need to pre-filter listings. For example, you may want to only show listings that have stock:
\Aero\Search\Elastic\Repositories\ElasticListings::extend(function (\Aero\Search\Elastic\Repositories\ElasticListings $listings) {
...
Search
Documents
Search
General
Search / Documents
What are the available documents?
There are 2 documents available:
Aero\Search\Elastic\Documents\ListingsDocument used to hold information about the listings that are shown on the storefront.
Aero\Search\Elastic\Documents\ProductDocument used to hold information about the products within the s...
Search / General
How do I re-index documents?
Aero automatically manages indexing changes to documents.
For example, if a product's stock level changes the document is updated to reflect the current version.
Adding and removing documents is also taken care of for you, sparing the need to schedule in daily...
Search / General
How do I re-build documents?
At times (especially during the development phase of a store build), it may be necessary to delete and documents and freshly index them. This process can be achieved using the following command:
php artisan aero:search:rebuild
Due to the nature of how this pro...
Search / Documents
How can I extend the document structure?
To extend a document, use the
add() method, to define a closure that will return an
array of data to merge into the document structure:
\Aero\Search\Elastic\Documents\ListingDocument::add('search-result', function ($document) {
$colors = $document->getMo...
Search / Listings
How do I create a custom sort order for the listings pages?
When you set the sort get parameter in a listing pages url (e.g. ?sort=name-az), a method is called on the
\Aero\Search\Elastic\Query\Builder class (for name-az the method
sortByNameAz is called).
You can find the default sort by methods in the
Aero\Search\E...
Admin
Resource Lists
Admin / Resource Lists
What are the available resource lists?
Class
View
\Aero\Admin\ResourceLists\AttributeGroupsResourceList
admin::resource-lists.index
\Aero\Admin\ResourceLists\BlocksResourceList
admin::resource-lists.index
\Aero\Admin\ResourceLists\CategoriesResourceList
admin::resource-lists.index
\Aero\Admin\Resou...