fuc-new/vendor/illuminate/database/Console/Seeds/WithoutModelEvents.php
hellcat 1fe8673f62 1
2025-10-01 13:34:29 +08:00

20 lines
406 B
PHP
Executable File

<?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);
}
}