PHP code example of sineld / bladeset

1. Go to this page and download the library: Download sineld/bladeset 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/ */

    

sineld / bladeset example snippets


@set('myVariable', $existing_variable)

// or

@set("myVariable", "Hello, World!")

{{ $myVariable }}

@set('myModelList', MyModel::where('something', '=', 1)->paginate(10))

@set('username', 'sineld')

@var("username", "sineld")

@assign('username', 'sineld')

 $myModelList = MyModel::where('something', '=', 1)->paginate(10); 

@set('myModelList', MyModel::where('something', '=', 1)->paginate(10))

@set('week', 0);

@foreach ($things as $thing)
  @if ($week != $thing->week)
    WEEK {{ $thing->week }}
    @set('week', $thing->week)
  @endif

  Title: {{ $thing->title }}
@endforeach

composer 

"sineld/bladeset": "8.0"

composer update

Sineld\BladeSet\BladeSetServiceProvider::class,

php artisan vendor:publish