Skip to content

Commit

Permalink
add method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 24, 2024
1 parent a478211 commit be2222f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Illuminate/View/Compilers/BladeCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,20 @@ public function aliasInclude($path, $alias = null)
});
}

/**
* Register a handler for custom directives, binding the handler to the compiler.
*
* @param string $name
* @param callable $handler
* @return void
*
* @throws \InvalidArgumentException
*/
public function bindDirective($name, callable $handler)
{
$this->directive($name, $handler, bind: true);
}

/**
* Register a handler for custom directives.
*
Expand Down

0 comments on commit be2222f

Please sign in to comment.