暂存
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user