w0bm.com v1.5z FULL.RETARD.BUILD.BUT.STILL.WORKS
This commit is contained in:
33
app/Providers/BladeServiceProvider.php
Normal file
33
app/Providers/BladeServiceProvider.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Blade;
|
||||
|
||||
class BladeServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
/* @simplemd($var) */
|
||||
/** @var \Illuminate\View\Compilers\BladeCompiler $compiler */
|
||||
Blade::directive('simplemd', function($text) {
|
||||
return "<?php echo App\\Models\\Comment::simplemd({$text}); ?>";
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user