WowPress-Tailwind/theme/vendor/illuminate/database/Console/Seeds/WithoutModelEvents.php

20 lines
406 B
PHP
Raw Normal View History

2024-04-15 16:00:49 +02:00
<?php
namespace Illuminate\Database\Console\Seeds;
use Illuminate\Database\Eloquent\Model;
trait WithoutModelEvents
{
/**
* Prevent model events from being dispatched by the given callback.
*
* @param callable $callback
* @return callable
*/
public function withoutModelEvents(callable $callback)
{
return fn () => Model::withoutEvents($callback);
}
}