Skip to content

Instantly share code, notes, and snippets.

View ekandreas's full-sized avatar

Andreas Ek ekandreas

View GitHub Profile
@extends('views.master')
@section('main')
<h1>Home</h1>
@while( have_posts() )
{{ the_post() }}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ wp_title() }}</title>
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/cosmo/bootstrap.min.css" rel="stylesheet" />
{{ wp_head() }}
</head>
<body {{ body_class() }}>
<div class="main container">
@extends('views.master')
@section('main')
<h1>{{ the_title() }}</h1>
@while( have_posts() )
{{ the_post() }}
<!-- Stored in views/layouts/master.blade.php -->
<html>
<head>
<title>App Name - @yield('title')</title>
</head>
<body>
@section('sidebar')
This is the master sidebar.
@show
<div class="container">
<!-- Stored in views/child.blade.php -->
@extends('layouts.master')
@section('title', 'Page Title')
@section('sidebar')
@parent
<p>This is appended to the master sidebar.</p>
{{ the_title() }}
The current UNIX timestamp is {{ time() }}.
<h1>WordPress</h1>
Hello, @{{ name }}.
{{ isset($name) ? $name : 'Default' }}
{{ $name or 'Default' }}