2017 © Pedro Peláez
 

library laravel-raw-view

It's intended to compile a view from the HTML string 'on the fly'. You don't need to create a view file.

image

sergant210/laravel-raw-view

It's intended to compile a view from the HTML string 'on the fly'. You don't need to create a view file.

  • Thursday, March 29, 2018
  • by sergant210
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

RawView

RawView for Laravel 5.5+ gives an ability to compile a view from the raw HTML code with Blade directives without creating a view file., (*1)

Install

Via Composer, (*2)

``` bash $ composer require sergant210/laravel-raw-view, (*3)

After that the view_raw function will be available. It works like the view function but you must specify the HTML code instead of the name of the view.

## Usage

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

// View


    @foreach($items as $item) {!! $item->render() !!} @endforeach

Changelog

Please see CHANGELOG for more information on what has changed recently., (*4)

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

29/03 2018

dev-master

9999999-dev https://github.com/sergant210/laravel-raw-view

It's intended to compile a view from the HTML string 'on the fly'. You don't need to create a view file.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blade view rawview

25/03 2018

1.0.0

1.0.0.0 https://github.com/sergant210/RawView

It's intended to compile raw blade expressions. You don't need to make a view.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel blade view rawview