PHP code example of surgiie / laravel-blade-cli

1. Go to this page and download the library: Download surgiie/laravel-blade-cli 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/ */

    

surgiie / laravel-blade-cli example snippets




if($name == "Bob") {
    $name = "Uncle Bob";
}

// do more stuff

$__command->info("Did stuff!");

// return mutated variables, will be merged to existing variables
// if no mutation is needed, the return statement is not necessary
return [
    "name" => $name,
];





// ce "vendor/autoload.php";

use App\View\Components\ExampleComponent;


Blade::component('example', ExampleComponent::class);

bash
larave-blade render template.yaml --name="Bob" --
yaml
<x-example :name="$name" />