Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
7d5b6b37
Commit
7d5b6b37
authored
Apr 10, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added blade comments and documentation.
parent
222383c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
blade.php
laravel/blade.php
+14
-0
changes.md
laravel/documentation/changes.md
+1
-0
templating.md
laravel/documentation/views/templating.md
+10
-0
No files found.
laravel/blade.php
View file @
7d5b6b37
...
@@ -9,6 +9,7 @@ class Blade {
...
@@ -9,6 +9,7 @@ class Blade {
*/
*/
protected
static
$compilers
=
array
(
protected
static
$compilers
=
array
(
'layouts'
,
'layouts'
,
'comments'
,
'echos'
,
'echos'
,
'forelse'
,
'forelse'
,
'empty'
,
'empty'
,
...
@@ -152,6 +153,19 @@ class Blade {
...
@@ -152,6 +153,19 @@ class Blade {
return
str_replace
(
array
(
"('"
,
"')"
),
''
,
$matches
[
1
]);
return
str_replace
(
array
(
"('"
,
"')"
),
''
,
$matches
[
1
]);
}
}
/**
* Rewrites Blade comments into PHP comments.
*
* @param string $value
* @return string
*/
protected
static
function
compile_comments
(
$value
)
{
$value
=
preg_replace
(
'/\{\{--(.+?)(--\}\})?\n/'
,
"<?php // $1 ?>"
,
$value
);
return
preg_replace
(
'/\{\{--((.|\s)*?)--\}\}/'
,
"<?php /* $1 */ ?>
\n
"
,
$value
);
}
/**
/**
* Rewrites Blade echo statements into PHP echo statements.
* Rewrites Blade echo statements into PHP echo statements.
*
*
...
...
laravel/documentation/changes.md
View file @
7d5b6b37
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
-
[
Added `sync` method to has\_many\_and\_belongs\_to Eloquent relationship
](
/docs/database/eloquent#sync-method
)
.
-
[
Added `sync` method to has\_many\_and\_belongs\_to Eloquent relationship
](
/docs/database/eloquent#sync-method
)
.
-
[
Added `save` method to has\_many Eloquent relationship
](
/docs/database/eloquent#has-many-save
)
.
-
[
Added `save` method to has\_many Eloquent relationship
](
/docs/database/eloquent#has-many-save
)
.
-
[
Added `unless` structure to Blade template engine
](
/docs/views/templating#blade-unless
)
.
-
[
Added `unless` structure to Blade template engine
](
/docs/views/templating#blade-unless
)
.
-
[
Added Blade comments
](
/docs/views/templating#blade-comments
)
.
-
Migrated to the Symfony HttpFoundation component for core request / response handling.
-
Migrated to the Symfony HttpFoundation component for core request / response handling.
-
Fixed the passing of strings into the
`Input::except`
method.
-
Fixed the passing of strings into the
`Input::except`
method.
-
Fixed replacement of optional parameters in
`URL::transpose`
method.
-
Fixed replacement of optional parameters in
`URL::transpose`
method.
...
...
laravel/documentation/views/templating.md
View file @
7d5b6b37
...
@@ -118,6 +118,16 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
...
@@ -118,6 +118,16 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
...
...
<?php endif; ?>
<?php endif; ?>
<a
name=
"blade-comments"
></a>
#### Blade comments:
@if ($check)
{{-- This is a comment --}}
...
@endif
> **Note:** Blade comments, unlike HTML comments, are not visible in the HTML source.
<a
name=
"blade-layouts"
></a>
<a
name=
"blade-layouts"
></a>
## Blade Layouts
## Blade Layouts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment