Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Categories package for Shopavel

Configuration

Facade

'aliases' => array(
    ...
    'Categories' => 'Shopavel\Categories\Facades\Categories',
);

Usage

Category

use Shopavel\Categories\Category;

$category = Category::find(1);

foreach ($category->products() as $product)
{
    // ...
}

Categories

You can use the facade to access the repository methods:

// Returns a products repository restricted to those within the category
Categories::products($category_id);

You can alter the query using methods from the product repository, and other default query builder methods:

Categories::products($category_id)->bestselling()->take(10);

License

All Shopavel packages are open-sourced software licensed under the MIT license

About

Categories package for Shopavel

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages