master

laravel/framework

Last updated at: 29/12/2023 09:22

SchemaLoaded.php

TLDR

This file defines a class called SchemaLoaded in the Illuminate\Database\Events namespace. The class has properties related to a database connection, connection name, and the path to a schema dump. It also has a constructor method that initializes these properties.

Classes

SchemaLoaded

The SchemaLoaded class represents an event that is fired when a database schema is loaded. It has the following properties:

  • connection: The database connection instance.
  • connectionName: The name of the database connection.
  • path: The path to the schema dump.

The class provides a constructor method that accepts a Connection instance and a path to initialize these properties.

<?php

namespace Illuminate\Database\Events;

class SchemaLoaded
{
    /**
     * The database connection instance.
     *
     * @var \Illuminate\Database\Connection
     */
    public $connection;

    /**
     * The database connection name.
     *
     * @var string
     */
    public $connectionName;

    /**
     * The path to the schema dump.
     *
     * @var string
     */
    public $path;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Database\Connection  $connection
     * @param  string  $path
     * @return void
     */
    public function __construct($connection, $path)
    {
        $this->connection = $connection;
        $this->connectionName = $connection->getName();
        $this->path = $path;
    }
}