laravel / 10 / api / 10.x / illuminate / database / eloquent / prunable.html

Prunable

trait Prunable (View source)

Methods

int pruneAll(int $chunkSize = 1000)

Prune all prunable models in the database.

Builder prunable()

Get the prunable model query.

bool|null prune()

Prune the model in the database.

void pruning()

Prepare the model for pruning.

Details

int pruneAll(int $chunkSize = 1000)

Prune all prunable models in the database.

Parameters

int $chunkSize

Return Value

int

Builder prunable()

Get the prunable model query.

Return Value

bool|null prune()

Prune the model in the database.

Return Value

bool|null

protected void pruning()

Prepare the model for pruning.

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Database/Eloquent/Prunable.html