Comments (4)
Not a problem with BladeOne, check http://php.net/manual/de/function.header.php how to use header() function properly.
from bladeone.
I added an example of json.
In the php file
...
$drinks= array('Cocacola','Pepsi','Fanta','Sprite','7up');
$json=json_encode($drinks);
header('Content-Type: application/json');
echo $blade->run("TestJson.example",['json'=>$json]);
in the template example.blade.php
{!! $json !!}
from bladeone.
Thank you... I set ob_start(); before echoing the blade and it works. :)
ob_start();
header("HTTP/1.1 200 OK");
header("Status: 200 OK");
header("Content-type: text/xml");
Anyway, your blade doesn't ignore any @media screen from css in <style> area. Can you solve it?
from bladeone.
you should escape every "@" with a double @@ , for example @@media
Based in laravel's blade
http://stackoverflow.com/questions/29450708/using-at-sign-in-php-laravel-strings
from bladeone.
Related Issues (20)
- Custom fatal exception view HOT 1
- BladeOne compatibility with acf_register_block_type HOT 1
- Blade directive inside any comment causes Blade to try and parse it as uncommented and crashes. HOT 2
- BladeOne::getCompiledFile's hashes should include the full template path HOT 1
- The cache directory is automatically created in v4.6, but not in v4.7 and v4.7.1.
- components included get params/vars passed from previous call if omitted HOT 1
- Small note for cleanup: Param $isParent @ runInternal is never used HOT 2
- Template stack only work when push is called before stack tag HOT 1
- Use of ngettext isn't working HOT 1
- Load all stacks with a certain prefix HOT 3
- If statements without spaces HOT 1
- State of BladeOneCacheRedis?
- ParseError in @extends
- Foreach returning error HOT 2
- Mbstring Requirement HOT 2
- @auth with multiple roles
- Documentation issue default/defaultcase
- refazer facial
- Some errors are not catched in the view evalutation process HOT 1
- Inconsistent Line Endings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bladeone.