Spec-Zone.ru › Laravel 8

Conditionable

trait Conditionable (View source)

Methods

$this|mixed when(mixed $value, callable $callback, callable|null $default = null)

Apply the callback if the given "value" is truthy.

$this|mixed unless(mixed $value, callable $callback, callable|null $default = null)

Apply the callback if the given "value" is falsy.

Details

$this|mixed when(mixed $value, callable $callback, callable|null $default = null)

Apply the callback if the given "value" is truthy.

Parameters

mixed $value
callable $callback
callable|null $default

Return Value

$this|mixed

$this|mixed unless(mixed $value, callable $callback, callable|null $default = null)

Apply the callback if the given "value" is falsy.

Parameters

mixed $value
callable $callback
callable|null $default

Return Value

$this|mixed

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Support/Traits/Conditionable.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API