getMacro() public method

Get the given macro by name.
public getMacro ( string $name ) : Closure
$name string
return Closure
コード例 #1
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * Get the given macro by name.
  *
  * @param string $name
  * @return \Closure 
  * @static 
  */
 public static function getMacro($name)
 {
     return \Illuminate\Database\Eloquent\Builder::getMacro($name);
 }
コード例 #2
0
ファイル: MorphTo.php プロジェクト: hilmysyarif/phpv8
 /**
  * Return trashed models with query if told so
  *
  * @param  \Illuminate\Database\Eloquent\Builder  $query
  * @return \Illuminate\Database\Eloquent\Builder
  */
 protected function useWithTrashed(Builder $query)
 {
     if ($this->withTrashed && $query->getMacro('withTrashed') !== null) {
         return $query->withTrashed();
     }
     return $query;
 }