DatabaseRefreshed.php
TLDR
This file defines the DatabaseRefreshed
class within the Illuminate\Database\Events
namespace. It implements the MigrationEvent
contract and provides a constructor to create a new event instance.
Classes
DatabaseRefreshed
The DatabaseRefreshed
class represents an event that is triggered when a database is refreshed. It implements the MigrationEvent
contract, which means it provides methods that can be used during migration events.
The class has a constructor that accepts two parameters:
-
$database
(nullable string): The name of the database being refreshed. -
$seeding
(boolean): Indicates if the database refresh includes seeding. The constructor initializes the properties of the class with the provided values.
<?php
namespace Illuminate\Database\Events;
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
class DatabaseRefreshed implements MigrationEventContract
{
/**
* Create a new event instance.
*
* @param string|null $database
* @param bool seeding
* @return void
*/
public function __construct(
public ?string $database = null,
public bool $seeding = false
) {
//
}
}