master

laravel/framework

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

LocaleUpdated.php

TLDR

This file defines the LocaleUpdated class in the Illuminate\Foundation\Events namespace. The class represents an event that is triggered when the locale is updated.

Classes

LocaleUpdated

The LocaleUpdated class is an event class that represents the event when the locale is updated. It has the following properties and methods:

  • locale: The new locale. This property is public and can be accessed directly.
  • __construct($locale): A constructor method that initializes the LocaleUpdated object. It takes a parameter $locale representing the new locale.
<?php

namespace Illuminate\Foundation\Events;

class LocaleUpdated
{
    /**
     * The new locale.
     *
     * @var string
     */
    public $locale;

    /**
     * Create a new event instance.
     *
     * @param  string  $locale
     * @return void
     */
    public function __construct($locale)
    {
        $this->locale = $locale;
    }
}