PHP code example of bgaze / laravel-blade-indenter
1. Go to this page and download the library: Download bgaze/laravel-blade-indenter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bgaze / laravel-blade-indenter example snippets
use Bgaze\BladeIndenter\BladeIndenter;
$indentedString = resolve(BladeIndenter::class)->indent($stringToIndent);
// Indent a string
$indentedString = indent_blade_string($stringToIndent);
// Indent a blade file, overwrite it and return formatted content.
$indentedFileContent = indent_blade_file($filePath);
// Indent a blade file and return formatted content without overwriting.
$indentedFileContent = indent_blade_file($filePath, false);
php artisan vendor:publish --tag=blade-indenter-config