Commit 6923b7c9 authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #623 from sparksp/develop-patch-view

Fix View's use of Events so you can actually implement your own things
parents e85ca96e 0baf5ad9
...@@ -42,7 +42,7 @@ class Blade { ...@@ -42,7 +42,7 @@ class Blade {
// return false so the View can be rendered as normal. // return false so the View can be rendered as normal.
if ( ! str_contains($view->path, BLADE_EXT)) if ( ! str_contains($view->path, BLADE_EXT))
{ {
return false; return;
} }
$compiled = path('storage').'views/'.md5($view->path); $compiled = path('storage').'views/'.md5($view->path);
......
...@@ -151,7 +151,7 @@ class Event { ...@@ -151,7 +151,7 @@ class Event {
} }
} }
return $responses; return $halt ? null : $responses;
} }
} }
\ No newline at end of file
...@@ -125,7 +125,7 @@ class View implements ArrayAccess { ...@@ -125,7 +125,7 @@ class View implements ArrayAccess {
// We delegate the determination of view paths to the view loader event // We delegate the determination of view paths to the view loader event
// so that the developer is free to override and manage the loading // so that the developer is free to override and manage the loading
// of views in any way they see fit for their application. // of views in any way they see fit for their application.
$path = Event::first(static::loader, array($bundle, $view)); $path = Event::until(static::loader, array($bundle, $view));
if ( ! is_null($path)) if ( ! is_null($path))
{ {
...@@ -322,9 +322,9 @@ class View implements ArrayAccess { ...@@ -322,9 +322,9 @@ class View implements ArrayAccess {
// allows easy attachment of other view parsers. // allows easy attachment of other view parsers.
if (Event::listeners(static::engine)) if (Event::listeners(static::engine))
{ {
$result = Event::first(static::engine, array($this)); $result = Event::until(static::engine, array($this));
if ($result !== false) return $result; if ( ! is_null($result)) return $result;
} }
return $this->get(); return $this->get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment