Scope.php
TLDR
The provided file defines an interface called Scope
in the Illuminate\Database\Eloquent
namespace. This interface contains a single method called apply
which should be implemented by any class that implements the Scope
interface.
Methods
apply
This method is responsible for applying the scope to a given Eloquent query builder. It takes two parameters:
-
$builder
: An instance of theBuilder
class from theIlluminate\Database\Eloquent
namespace. -
$model
: An instance of theModel
class from theIlluminate\Database\Eloquent
namespace.
This method does not return a value.
Classes
N/A
<?php
namespace Illuminate\Database\Eloquent;
interface Scope
{
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
* @return void
*/
public function apply(Builder $builder, Model $model);
}