Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
353c7c52
Commit
353c7c52
authored
Feb 21, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up code.
parent
f6ef233d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
laravel/view.php
+3
-6
No files found.
laravel/view.php
View file @
353c7c52
...
@@ -237,8 +237,7 @@ class View implements ArrayAccess {
...
@@ -237,8 +237,7 @@ class View implements ArrayAccess {
// All nested views and responses are evaluated before the main view.
// All nested views and responses are evaluated before the main view.
// This allows the assets used by nested views to be added to the
// This allows the assets used by nested views to be added to the
// asset container before the main view is evaluated and dumps
// asset container before the main view is evaluated.
// the links to the assets into the HTML.
foreach
(
$data
as
&
$value
)
foreach
(
$data
as
&
$value
)
{
{
if
(
$value
instanceof
View
or
$value
instanceof
Response
)
if
(
$value
instanceof
View
or
$value
instanceof
Response
)
...
@@ -259,14 +258,12 @@ class View implements ArrayAccess {
...
@@ -259,14 +258,12 @@ class View implements ArrayAccess {
{
{
// Compiled views are stored in the storage directory using the MD5
// Compiled views are stored in the storage directory using the MD5
// hash of their path. This allows us to easily store the views in
// hash of their path. This allows us to easily store the views in
// the directory without worrying about re-creating the entire
// the directory without worrying about structure.
// application view directory structure.
$compiled
=
path
(
'storage'
)
.
'views/'
.
md5
(
$this
->
path
);
$compiled
=
path
(
'storage'
)
.
'views/'
.
md5
(
$this
->
path
);
// The view will only be re-compiled if the view has been modified
// The view will only be re-compiled if the view has been modified
// since the last compiled version of the view was created or no
// since the last compiled version of the view was created or no
// compiled view exists. Otherwise, the path will be returned
// compiled view exists at all in storage.
// without re-compiling the view.
if
(
!
file_exists
(
$compiled
)
or
(
filemtime
(
$this
->
path
)
>
filemtime
(
$compiled
)))
if
(
!
file_exists
(
$compiled
)
or
(
filemtime
(
$this
->
path
)
>
filemtime
(
$compiled
)))
{
{
file_put_contents
(
$compiled
,
Blade
::
compile
(
$this
->
path
));
file_put_contents
(
$compiled
,
Blade
::
compile
(
$this
->
path
));
...
...
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