11.08.2017 Views

codebright

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Blade 91<br />

standard view files. The only difference is that they use the .blade.php extension rather than just<br />

.php.<br />

Let’s create a simple template.<br />

1 <br />

2<br />

3 Dear Lord Otwell<br />

4 I hereby challenge you to a duel for the honour of Laravel.<br />

5<br />

6 <br />

Here we have our blade template, looks kinda similar to what we have seen already right? That’s<br />

because Blade first parses the file as PHP. You see our $squirrel? Every view file must have a<br />

squirrel. OK, that’s not true, but it does show that PHP can be parsed just as before.<br />

We can show this using the same syntax as we would for a normal view. You might have assumed<br />

that it would require passing example.blade to the View::make() method, but that would be<br />

incorrect.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!