Skip to content

Commit 2cef3a6

Browse files
authoredSep 8, 2017
Merge pull request #34 from jp-davy/patch-1
Update DbView.php
2 parents 5d6e198 + d9bef93 commit 2cef3a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/Flynsarmy/DbBladeCompiler/DbView.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ public function render(Closure $callback = null)
7474
// Once we have the contents of the view, we will flush the sections if we are
7575
// done rendering all views so that there is nothing left hanging over when
7676
// anothoer view is rendered in the future by the application developers.
77-
( str_contains( app()->version(), ['5.3','5.2', '5.1']) ? View::flushSectionsIfDoneRendering() : View::flushStateIfDoneRendering());
77+
// Before flushing, check Laravel version for correct method use
78+
if ( version_compare(app()->version(), '5.4.0') >= 0 )
79+
View::flushStateIfDoneRendering();
80+
else
81+
View::flushSectionsIfDoneRendering();
7882

7983
return $response ?: $contents;
8084
}

0 commit comments

Comments
 (0)
Please sign in to comment.