HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/lesanew/anestetues2/vendor/roots/acorn/src/Roots/Acorn/Assets/Concerns/Conditional.php
<?php

namespace Roots\Acorn\Assets\Concerns;

trait Conditional
{
    /**
     * Conditionally load assets.
     *
     * @var bool
     */
    protected $conditional = true;

    /**
     * Set conditional loading.
     *
     * @param  bool|callable  $conditional
     * @return $this
     */
    public function when($conditional, ...$args)
    {
        $this->conditional = is_callable($conditional)
            ? call_user_func($conditional, $args)
            : $conditional;

        return $this;
    }
}