PHP code example of sergant210 / laravel-raw-view

1. Go to this page and download the library: Download sergant210/laravel-raw-view 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/ */

    

sergant210 / laravel-raw-view example snippets

 php
class Item
{
	public $tpl = '<li class="{{ $item->makeClasses() }}"> {{ $item->name }}';
	...
	public function render()
	{
	    return view_raw($this->tpl, ['item' => $this])->render();
	}
}

// View
<ul>
@foreach($items as $item)
    {!! $item->render() !!}
@endforeach
</ul>