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
d9c0dc0c
Commit
d9c0dc0c
authored
Jun 03, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:laravel/laravel into develop
parents
1ac911f0
930a3e89
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
11 deletions
+29
-11
index.blade.php
application/views/home/index.blade.php
+2
-2
core.php
laravel/core.php
+8
-4
model.php
laravel/database/eloquent/model.php
+5
-5
routing.md
laravel/documentation/routing.md
+4
-0
response.php
laravel/response.php
+10
-0
No files found.
application/views/home/index.blade.php
View file @
d9c0dc0c
...
...
@@ -18,7 +18,7 @@
</header>
<div
role=
"main"
class=
"main"
>
<div
class=
"home"
>
<h2>
Learn the terrain.
</h
3
>
<h2>
Learn the terrain.
</h
2
>
<p>
You've landed yourself on our default home page. The route that
...
...
@@ -34,7 +34,7 @@
<h2>
Grow in knowledge.
</h2>
<p>
Leaning to use Laravel is amazingly simple thanks to
Lea
r
ning to use Laravel is amazingly simple thanks to
its {{ HTML::link('docs', 'wonderful documentation') }}.
</p>
...
...
laravel/core.php
View file @
d9c0dc0c
...
...
@@ -148,15 +148,19 @@ Request::$foundation = RequestFoundation::createFromGlobals();
|--------------------------------------------------------------------------
|
| Next we're ready to determine the application environment. This may be
| set either via the command line options, or, if the request is from
| the web, via the mapping of URIs to environments that lives in
| the "paths.php" file for the application and is parsed.
| set either via the command line options or via the mapping of URIs to
| environments that lives in the "paths.php" file for the application and
| is parsed. When determining the CLI environment, the "--env" CLI option
| overrides the mapping in "paths.php".
|
*/
if
(
Request
::
cli
())
{
$environment
=
get_cli_option
(
'env'
);
if
(
!
isset
(
$environment
))
{
$environment
=
Request
::
detect_env
(
$environments
,
gethostname
());
}
}
else
{
...
...
laravel/database/eloquent/model.php
View file @
d9c0dc0c
...
...
@@ -230,11 +230,9 @@ abstract class Model {
* @param array $columns
* @return Model
*/
public
static
function
find
(
$id
,
$columns
=
array
(
'*'
))
public
function
_
find
(
$id
,
$columns
=
array
(
'*'
))
{
$model
=
new
static
;
return
$model
->
query
()
->
where
(
static
::
$key
,
'='
,
$id
)
->
first
(
$columns
);
return
$this
->
query
()
->
where
(
static
::
$key
,
'='
,
$id
)
->
first
(
$columns
);
}
/**
...
...
@@ -746,10 +744,12 @@ abstract class Model {
return
static
::
$$method
;
}
$underscored
=
array
(
'with'
,
'find'
);
// Some methods need to be accessed both staticly and non-staticly so we'll
// keep underscored methods of those methods and intercept calls to them
// here so they can be called either way on the model instance.
if
(
in_array
(
$method
,
array
(
'with'
)
))
if
(
in_array
(
$method
,
$underscored
))
{
return
call_user_func_array
(
array
(
$this
,
'_'
.
$method
),
$parameters
);
}
...
...
laravel/documentation/routing.md
View file @
d9c0dc0c
...
...
@@ -307,6 +307,10 @@ This routing convention may not be desirable for every situation, so you may als
Route::get('welcome', array('after' => 'log', 'uses' => 'home@index'));
#### Registering a named route that points to a controller action:
Route::get('welcome', array('as' => 'home.welcome', 'uses' => 'home@index'));
<a
name=
"cli-route-testing"
></a>
## CLI Route Testing
...
...
laravel/response.php
View file @
d9c0dc0c
...
...
@@ -334,4 +334,14 @@ class Response {
}
}
/**
* Render the response when cast to string
*
* @return string
*/
public
function
__toString
()
{
return
$this
->
render
();
}
}
\ No newline at end of file
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