Laravel/PHP Articles

Articles from Laravel/PHP sites on the web

Laravel/PHP Articles
* * @param \Illuminate\View\Engines\EngineResolver $resolver * @return void */ public function registerBladeEngine($resolver) { $this->app->singleton('blade.compiler', function () { return new BladeFiltersCompiler( $this->app['files'], $this->app['config']['view.compiled'] ); }); $resolver->register('blade', function () { return new CompilerEngine($this->app['blade.compiler']); }); } }Don’t forget to register it in your app.php config file! *)(?=\);\s\?>)/u', function ($matches) { return $this->parseFilters($matches[0]); }, $value); } /** * Parse the blade filters and pass them to the echo. *)/u', $value, $matches)) { return $value; } $filters = preg_split('/\|(?=(? :[^\'\"\`]*([\'\"\`])[^\'\"\`]*\1)*[^\'\"\`]*$)/u', $matches[0]); if (empty($filters = array_values(array_filter(array_map('trim', $filters))))) { return $value; } foreach ($filters as $key => $filter) { $filter = preg_split('/:(?=(? The Blade Filters PackageWe wrote a package, that handles the filter parsing and compiling behind the scenes.

Sign Up For Our Newsletter

Each Week, We curate the top Laravel/PHP articles, jobs, events and More!

We'll send you a weekly email with the latest Laravel/PHP articles, jobs and events. Please review our Code of Conduct in the meantime. Talk to you soon!