Created
April 10, 2018 14:38
-
-
Save robertoandres24/ef580ed766394d5177a645cc0a4c44cd to your computer and use it in GitHub Desktop.
Components And Slots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="alert"> | |
{{ $slot }} | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@component('zonda.layout') | |
@slot('title') | |
Customized Page Title | |
@endslot | |
<div> | |
@component('zonda.alert') | |
This is the alert message here. | |
@endcomponent | |
This is the content that gets injected into the page. | |
</div> | |
@endcomponent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>{{ $title or 'Default Title' }}</title> | |
<style> | |
div.alert { | |
color: red; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>My Application</h1> | |
<div class="container"> | |
{{ $slot }} | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment