Remove empty spaces in show invoice view

This commit is contained in:
CTSoft
2020-08-09 11:45:40 +02:00
parent 8855b0582f
commit c4ff98febe
2 changed files with 73 additions and 49 deletions

View File

@ -4,6 +4,7 @@ namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Illuminate\View\Factory as ViewFactory;
class Macro extends ServiceProvider
{
@ -26,6 +27,15 @@ class Macro extends ServiceProvider
return $string;
});
ViewFactory::macro('hasStack', function (...$sections) {
foreach ($sections as $section) {
if (isset($this->pushes[$section]) || isset($this->prepends[$section])) {
return true;
}
}
return false;
});
}
/**