master

laravel/framework

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

ModelsPruned.php

TLDR

This file contains the ModelsPruned class, which is an event class used in the Illuminate\Database\Events namespace. It has two public properties (model and count) and a constructor method to initialize those properties.

Classes

ModelsPruned

The ModelsPruned class is an event class used in the Illuminate\Database\Events namespace. It represents an event that is triggered when models are pruned. This class has the following properties:

  • $model: The class name of the model that was pruned.
  • $count: The number of pruned records.

The ModelsPruned class also has a constructor method (__construct) that takes the $model and $count parameters and initializes the corresponding properties.

<?php

namespace Illuminate\Database\Events;

class ModelsPruned
{
    /**
     * The class name of the model that was pruned.
     *
     * @var string
     */
    public $model;

    /**
     * The number of pruned records.
     *
     * @var int
     */
    public $count;

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