class Category extends Model

Traits

Methods

void
generateSlug(string $value)

Generate the slug.

from Slugable
static Collection
allFromSlugs(array $slugs)

Get the models from an array of slugs.

from Slugable
static Collection
exceptFromSlugs(array $slugs)

Get all models except the given array of slugs.

from Slugable
static bool
slugExists(string $slug)

Check if the slug already exists.

from Slugable
static void
boot()

The "booting" method of the model.

static Builder
main()

Query the main categories.

Builder
childrens()

Query the main subcategories.

Builder
parent()

Query the parent category.

Builder
products()

Query the products.

Details

in Slugable at line 15
void generateSlug(string $value)

Generate the slug.

Parameters

string $value

Return Value

void

in Slugable at line 32
static Collection allFromSlugs(array $slugs)

Get the models from an array of slugs.

Parameters

array $slugs

Return Value

Collection

in Slugable at line 43
static Collection exceptFromSlugs(array $slugs)

Get all models except the given array of slugs.

Parameters

array $slugs

Return Value

Collection

in Slugable at line 54
static bool slugExists(string $slug)

Check if the slug already exists.

Parameters

string $slug

Return Value

bool

at line 17
static protected void boot()

The "booting" method of the model.

Return Value

void

at line 31
static Builder main()

Query the main categories.

Return Value

Builder

at line 41
Builder childrens()

Query the main subcategories.

Return Value

Builder

at line 51
Builder parent()

Query the parent category.

Return Value

Builder

at line 61
Builder products()

Query the products.

Return Value

Builder