Commit 9fae4dc8 authored by Jason Lewis's avatar Jason Lewis

Merge branch 'master' into develop

parents 0dc124d3 8c580d17
...@@ -50,9 +50,9 @@ To determine if the user of your application is logged in, call the **check** me ...@@ -50,9 +50,9 @@ To determine if the user of your application is logged in, call the **check** me
return "You're logged in!"; return "You're logged in!";
} }
Use the **login** method to login a user without checking their credentials, such as after a user first registers to use your application. Just pass your user object or the user's ID: Use the **login** method to login a user without checking their credentials, such as after a user first registers to use your application. Just pass the user's ID:
Auth::login($user); Auth::login($user->id);
Auth::login(15); Auth::login(15);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
Controllers are classes that are responsible for accepting user input and managing interactions between models, libraries, and views. Typically, they will ask a model for data, and then return a view that presents that data to the user. Controllers are classes that are responsible for accepting user input and managing interactions between models, libraries, and views. Typically, they will ask a model for data, and then return a view that presents that data to the user.
The usage of controllers is the most common method of implementing application logic in modern web-development. However, Laravel also empowers developers to implement their application logic within routing declarations. This is explored in detail in the [routing document](/docs/routing). New users are encourage to start with controllers. There is nothing that route-based application logic can do that controllers can't. The usage of controllers is the most common method of implementing application logic in modern web-development. However, Laravel also empowers developers to implement their application logic within routing declarations. This is explored in detail in the [routing document](/docs/routing). New users are encouraged to start with controllers. There is nothing that route-based application logic can do that controllers can't.
Controller classes should be stored in **application/controllers** and should extend the Base\_Controller class. A Home\_Controller class is included with Laravel. Controller classes should be stored in **application/controllers** and should extend the Base\_Controller class. A Home\_Controller class is included with Laravel.
......
...@@ -295,6 +295,8 @@ The **Controller::detect** method simply returns an array of all of the controll ...@@ -295,6 +295,8 @@ The **Controller::detect** method simply returns an array of all of the controll
If you wish to automatically detect the controllers in a bundle, just pass the bundle name to the method. If no bundle is specified, the application folder's controller directory will be searched. If you wish to automatically detect the controllers in a bundle, just pass the bundle name to the method. If no bundle is specified, the application folder's controller directory will be searched.
> **Note:** It is important to note that this method gives you no control over the order in which controllers are loaded. Controller::detect() should only be used to Route controllers in very small sites. "Manually" routing controllers gives you much more control, is more self-documenting, and is certainly advised.
#### Register all controllers for the "admin" bundle: #### Register all controllers for the "admin" bundle:
Route::controller(Controller::detect('admin')); Route::controller(Controller::detect('admin'));
......
...@@ -27,7 +27,7 @@ enjoy, not something that is painful. Enjoy the fresh air. ...@@ -27,7 +27,7 @@ enjoy, not something that is painful. Enjoy the fresh air.
Route::get('/', function() Route::get('/', function()
{ {
return "Hello World!": return "Hello World!";
}); });
``` ```
...@@ -64,4 +64,4 @@ git commit -s -m "this commit will be signed off automatically!" ...@@ -64,4 +64,4 @@ git commit -s -m "this commit will be signed off automatically!"
## License ## License
Laravel is open-sourced software licensed under the MIT License. Laravel is open-sourced software licensed under the MIT License.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment