PHPackages                             johnturingan/laravel-fly-view - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. johnturingan/laravel-fly-view

ActiveProject[Templating &amp; Views](/categories/templating)

johnturingan/laravel-fly-view
=============================

Render Blade templates from string mark-up.

1.2.0(6y ago)163.9k2MITPHP

Since Feb 15Pushed 6y ago3 watchersCompare

[ Source](https://github.com/johnturingan/laravel-fly-view)[ Packagist](https://packagist.org/packages/johnturingan/laravel-fly-view)[ RSS](/packages/johnturingan-laravel-fly-view/feed)WikiDiscussions master Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (0)

[Laravel](https://laravel.com)-fly-view
=======================================

[](#laravel-fly-view)

> Is an Extension of Laravel View Class which compiles String Template on the fly. It automatically detects changes on your string template and recompiles it if needed.

> This is useful if you want to render your template which came from other sources like CMS or third party API

> Since its an Extension of laravel View class. It will not interfere on the usual flow of your application. You can still use laravel view as per normal but with the capability of passing string template.

> It supports all directives of Blade Template.

> Supports Laravel 5.2+

Installation 🚥
--------------

[](#installation-traffic_light)

Add the package to your composer.json

```
"require": {
	...
	"johnturingan/laravel-fly-view": "{version}"
},

```

Or just run composer require

```
$ composer require johnturingan/laravel-fly-view
```

In config/app.php replace

###### Illuminate\\View\\ViewServiceProvider::class

[](#illuminateviewviewserviceproviderclass)

with

###### Snp\\FlyView\\Providers\\ViewServiceProvider::class

[](#snpflyviewprovidersviewserviceproviderclass)

Usage ✅
-------

[](#usage-white_check_mark)

###### View normal usage:

[](#view-normal-usage)

Pass path to blade file using dot notation on the first parameter

```
return view('path.to.view', []);

```

###### Flyview usage:

[](#flyview-usage)

Pass array of strings on the first parameter

```
return view([ 'String Template with {{$blade}} syntax and @directives' ], []);

```

or you can do

```
return view([
    '{{ $token }}',
    '{{ $me }}'
], [
    'token' => Str::uuid(),
    'me' => 'Laravel Fly View'
]);

```

Flyview will merge all strings inside the array before compile. Useful if you have multiple template sources.

You can also use if from response helper like this.

```
return response()->view([
    '{{ $token }}',
    '{{ $me }}'
], [
    'token' => Str::uuid(),
    'me' => 'Laravel Fly View on Response Helper'
]);

```

Like I said before, it will not interfere the usual flow of Laravel View. Meaning you can do something like this.

```
$bag = [
    'include' => [
        '{{ $token }} - This is FlyView Include',
        '@include("includes.nativeInclude")  Above is Include Inception'
    ],
    'data' => [ 'token' => Str::uuid() ]
];

return view('includeTest', $bag);

```

Inside your includeTest.blade.php file is this:

```
@include('includes.nativeInclude', $data)

@include($include, $data)

```

Including string template to blade template file is possible.

Config 📄
--------

[](#config-page_facing_up)

All configuration is same as the default view config in your config folder with an additional settings to minimize view contents. Default is false.

```
/*
    |--------------------------------------------------------------------------
    | Minify View Content
    |--------------------------------------------------------------------------
    |
    | This option determines whether or not you want to minify view contents.
    | It removes unnecessary whitespace
    |
    */
    'minify' => false

```

**`NOTE:`**

If you find any bugs or you have some ideas in mind that would make this better. Please don't hesitate to send comment on github.

If you find this package helpful, a simple star is very much appreciated.

---

**[MIT](LICENSE) LICENSE**
copyright © 2018 Scripts and Pixels.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~195 days

Total

5

Last Release

2227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adc411a51679c3a310528787de90f8ace9d56d5c7c20c39c4b382d7d051e7aa5?d=identicon)[redgreenyellow](/maintainers/redgreenyellow)

---

Top Contributors

[![johnturingan](https://avatars.githubusercontent.com/u/9390421?v=4)](https://github.com/johnturingan "johnturingan (12 commits)")

---

Tags

laravellumenbladetemplateviewview cachingrender string mark-upview on the fly

### Embed Badge

![Health badge](/badges/johnturingan-laravel-fly-view/health.svg)

```
[![Health](https://phpackages.com/badges/johnturingan-laravel-fly-view/health.svg)](https://phpackages.com/packages/johnturingan-laravel-fly-view)
```

###  Alternatives

[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M109](/packages/jenssegers-blade)[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

87401.6k](/packages/ytake-laravel-smarty)[fiskhandlarn/blade

A library for using Laravel Blade templates in WordPress/WordPlate.

365.8k](/packages/fiskhandlarn-blade)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
