Created
September 28, 2017 19:37
-
-
Save mattdfloyd/63d03b2ba8bab054674ff4cbe8c28a6b to your computer and use it in GitHub Desktop.
Dusk Blade directive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Blade::directive('dusk', function ($expression) { | |
if (app()->environment('production')) { | |
return; | |
} | |
return "<?php echo sprintf('dusk=\"%s\"', $expression); ?>"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment