You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: authentication.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ If you choose not to use the provided `AuthController` implementation, you will
58
58
59
59
}
60
60
61
-
The `attempt` method accepts an array of key / value pairs as its first argument. The `password` value will be [hashed](/docs/master/hashing). The other values in the array will be used to find the user in your database table. So, in the example above, the user will be retrieved by the value of the `email` column. If the user is found, the hashed password stored in the database will be compared with the hashed `password` value passed to the method via the array. If the two hashed passwords match, a new authenticated session will be started for the user.
61
+
The `attempt` method accepts an array of key / value pairs as its first argument. The `password` value will be [hashed](/docs/5.0/hashing). The other values in the array will be used to find the user in your database table. So, in the example above, the user will be retrieved by the value of the `email` column. If the user is found, the hashed password stored in the database will be compared with the hashed `password` value passed to the method via the array. If the two hashed passwords match, a new authenticated session will be started for the user.
62
62
63
63
The `attempt` method will return `true` if authentication was successful. Otherwise, `false` will be returned.
64
64
@@ -140,7 +140,7 @@ Of course, if you are using the built-in Laravel authentication controllers, a c
140
140
141
141
#### Authentication Events
142
142
143
-
When the `attempt` method is called, the `auth.attempt`[event](/docs/master/events) will be fired. If the authentication attempt is successful and the user is logged in, the `auth.login` event will be fired as well.
143
+
When the `attempt` method is called, the `auth.attempt`[event](/docs/5.0/events) will be fired. If the authentication attempt is successful and the user is logged in, the `auth.login` event will be fired as well.
144
144
145
145
<aname="retrieving-the-authenticated-user"></a>
146
146
## Retrieving The Authenticated User
@@ -194,7 +194,7 @@ Second, you may access the authenticated user via an `Illuminate\Http\Request` i
194
194
195
195
}
196
196
197
-
Thirdly, you may type-hint the `Illuminate\Contracts\Auth\Authenticatable` contract. This type-hint may be added to a controller constructor, controller method, or any other constructor of a class resolved by the [service container](/docs/master/container):
197
+
Thirdly, you may type-hint the `Illuminate\Contracts\Auth\Authenticatable` contract. This type-hint may be added to a controller constructor, controller method, or any other constructor of a class resolved by the [service container](/docs/5.0/container):
198
198
199
199
<?php namespace App\Http\Controllers;
200
200
@@ -218,7 +218,7 @@ Thirdly, you may type-hint the `Illuminate\Contracts\Auth\Authenticatable` contr
218
218
<aname="protecting-routes"></a>
219
219
## Protecting Routes
220
220
221
-
[Route middleware](/docs/master/middleware) can be used to allow only authenticated users to access a given route. Laravel provides the `auth` middleware by default, and it is defined in `app\Http\Middleware\Authenticate.php`. All you need to do is attach it to a route definition:
221
+
[Route middleware](/docs/5.0/middleware) can be used to allow only authenticated users to access a given route. Laravel provides the `auth` middleware by default, and it is defined in `app\Http\Middleware\Authenticate.php`. All you need to do is attach it to a route definition:
222
222
223
223
// With A Route Closure...
224
224
@@ -247,7 +247,7 @@ By default, the `basic` middleware will use the `email` column on the user recor
247
247
248
248
#### Setting Up A Stateless HTTP Basic Filter
249
249
250
-
You may also use HTTP Basic Authentication without setting a user identifier cookie in the session, which is particularly useful for API authentication. To do so, [define a middleware](/docs/master/middleware) that calls the `onceBasic` method:
250
+
You may also use HTTP Basic Authentication without setting a user identifier cookie in the session, which is particularly useful for API authentication. To do so, [define a middleware](/docs/5.0/middleware) that calls the `onceBasic` method:
251
251
252
252
public function handle($request, Closure $next)
253
253
{
@@ -293,7 +293,7 @@ To get started with Socialite, include the package in your `composer.json` file:
293
293
294
294
"laravel/socialite": "~2.0"
295
295
296
-
Next, register the `Laravel\Socialite\SocialiteServiceProvider` in your `config/app.php` configuration file. You may also register a [facade](/docs/master/facades):
296
+
Next, register the `Laravel\Socialite\SocialiteServiceProvider` in your `config/app.php` configuration file. You may also register a [facade](/docs/5.0/facades):
Copy file name to clipboardExpand all lines: bus.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ The newly generated class will be placed in the `app/Commands` directory. By def
55
55
56
56
}
57
57
58
-
The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example:
58
+
The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/5.0/container). For example:
59
59
60
60
/**
61
61
* Execute the command.
@@ -116,7 +116,7 @@ If you would like to convert an existing command into a queued command, simply i
116
116
117
117
Then, just write your command normally. When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that.
118
118
119
-
For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues).
119
+
For more information on interacting with queued commands, view the full [queue documentation](/docs/5.0/queues).
120
120
121
121
<aname="command-pipeline"></a>
122
122
## Command Pipeline
@@ -141,7 +141,7 @@ A command pipe is defined with a `handle` method, just like a middleware:
141
141
142
142
}
143
143
144
-
Command pipe classes are resolved through the [IoC container](/docs/master/container), so feel free to type-hint any dependencies you need within their constructors.
144
+
Command pipe classes are resolved through the [IoC container](/docs/5.0/container), so feel free to type-hint any dependencies you need within their constructors.
145
145
146
146
You may even define a `Closure` as a command pipe:
Copy file name to clipboardExpand all lines: collections.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ As mentioned above, the `collect` helper will return a new `Illuminate\Support\C
31
31
32
32
$collection = Collection::make([1, 2, 3]);
33
33
34
-
Of course, collections of [Eloquent](/docs/master/eloquent) objects are always returned as `Collection` instances; however, you should feel free to use the `Collection` class wherever it is convenient for your application.
34
+
Of course, collections of [Eloquent](/docs/5.0/eloquent) objects are always returned as `Collection` instances; however, you should feel free to use the `Collection` class wherever it is convenient for your application.
Copy file name to clipboardExpand all lines: commands.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -122,4 +122,4 @@ Sometimes you may wish to call other commands from your command. You may do so u
122
122
123
123
#### Registering An Artisan Command
124
124
125
-
Once your command is finished, you need to register it with Artisan so it will be available for use. This is typically done in the `app/Console/Kernel.php` file. Within this file, you will find a list of commands in the `commands` property. To register your command, simply add it to this list. When Artisan boots, all the commands listed in this property will be resolved by the [IoC container](/docs/master/container) and registered with Artisan.
125
+
Once your command is finished, you need to register it with Artisan so it will be available for use. This is typically done in the `app/Console/Kernel.php` file. Within this file, you will find a list of commands in the `commands` property. To register your command, simply add it to this list. When Artisan boots, all the commands listed in this property will be resolved by the [IoC container](/docs/5.0/container) and registered with Artisan.
Copy file name to clipboardExpand all lines: configuration.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Renaming your application is entirely optional, and you are free to keep the `Ap
30
30
31
31
Laravel needs very little configuration out of the box. You are free to get started developing! However, you may wish to review the `config/app.php` file and its documentation. It contains several options such as `timezone` and `locale` that you may wish to change according to your location.
32
32
33
-
Once Laravel is installed, you should also [configure your local environment](/docs/master/configuration#environment-configuration).
33
+
Once Laravel is installed, you should also [configure your local environment](/docs/5.0/configuration#environment-configuration).
34
34
35
35
> **Note:** You should never have the `app.debug` configuration option set to `true` for a production application.
36
36
@@ -83,7 +83,7 @@ You may also pass arguments to the `environment` method to check if the environm
83
83
// The environment is either local OR staging...
84
84
}
85
85
86
-
To obtain an instance of the application, resolve the `Illuminate\Contracts\Foundation\Application` contract via the [service container](/docs/master/container). Of course, if you are within a [service provider](/docs/master/providers), the application instance is available via the `$this->app` instance variable.
86
+
To obtain an instance of the application, resolve the `Illuminate\Contracts\Foundation\Application` contract via the [service container](/docs/5.0/container). Of course, if you are within a [service provider](/docs/5.0/providers), the application instance is available via the `$this->app` instance variable.
87
87
88
88
An application instance may also be accessed via the `app` helper of the `App` facade:
89
89
@@ -117,7 +117,7 @@ The default template for maintenance mode responses is located in `resources/vie
117
117
118
118
### Maintenance Mode & Queues
119
119
120
-
While your application is in maintenance mode, no [queued jobs](/docs/master/queues) will be handled. The jobs will continue to be handled as normal once the application is out of maintenance mode.
120
+
While your application is in maintenance mode, no [queued jobs](/docs/5.0/queues) will be handled. The jobs will continue to be handled as normal once the application is out of maintenance mode.
121
121
122
122
<aname="pretty-urls"></a>
123
123
## Pretty URLs
@@ -143,4 +143,4 @@ On Nginx, the following directive in your site configuration will allow "pretty"
143
143
try_files $uri $uri/ /index.php?$query_string;
144
144
}
145
145
146
-
Of course, when using [Homestead](/docs/master/homestead), pretty URLs will be configured automatically.
146
+
Of course, when using [Homestead](/docs/5.0/homestead), pretty URLs will be configured automatically.
Copy file name to clipboardExpand all lines: container.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ A deep understanding of the Laravel service container is essential to building a
61
61
62
62
### Binding
63
63
64
-
Almost all of your service container bindings will be registered within [service providers](/docs/master/providers), so all of these examples will demonstrate using the container in that context. However, if you need an instance of the container elsewhere in your application, such as a factory, you may type-hint the `Illuminate\Contracts\Container\Container` contract and an instance of the container will be injected for you. Alternatively, you may use the `App` facade to access the container.
64
+
Almost all of your service container bindings will be registered within [service providers](/docs/5.0/providers), so all of these examples will demonstrate using the container in that context. However, if you need an instance of the container elsewhere in your application, such as a factory, you may type-hint the `Illuminate\Contracts\Container\Container` contract and an instance of the container will be injected for you. Alternatively, you may use the `App` facade to access the container.
65
65
66
66
#### Registering A Basic Resolver
67
67
@@ -295,7 +295,7 @@ Laravel provides several opportunities to use the service container to increase
295
295
296
296
}
297
297
298
-
In this example, the `OrderRepository` class will automatically be injected into the controller. This means that a "mock" `OrderRepository` may be bound into the container when [unit testing](/docs/master/testing), allowing for painless stubbing of database layer interaction.
298
+
In this example, the `OrderRepository` class will automatically be injected into the controller. This means that a "mock" `OrderRepository` may be bound into the container when [unit testing](/docs/5.0/testing), allowing for painless stubbing of database layer interaction.
Copy file name to clipboardExpand all lines: contracts.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ Contract | Laravel 4.x Facade
136
136
<aname="how-to-use-contracts"></a>
137
137
## How To Use Contracts
138
138
139
-
So, how do you get an implementation of a contract? It's actually quite simple. Many types of classes in Laravel are resolved through the [service container](/docs/master/container), including controllers, event listeners, filters, queue jobs, and even route Closures. So, to get an implementation of a contract, you can just "type-hint" the interface in the constructor of the class being resolved. For example, take a look at this event handler:
139
+
So, how do you get an implementation of a contract? It's actually quite simple. Many types of classes in Laravel are resolved through the [service container](/docs/5.0/container), including controllers, event listeners, filters, queue jobs, and even route Closures. So, to get an implementation of a contract, you can just "type-hint" the interface in the constructor of the class being resolved. For example, take a look at this event handler:
140
140
141
141
<?php namespace App\Handlers\Events;
142
142
@@ -175,4 +175,4 @@ So, how do you get an implementation of a contract? It's actually quite simple.
175
175
176
176
}
177
177
178
-
When the event listener is resolved, the service container will read the type-hints on the constructor of the class, and inject the appropriate value. To learn more about registering things in the service container, check out [the documentation](/docs/master/container).
178
+
When the event listener is resolved, the service container will read the type-hints on the constructor of the class, and inject the appropriate value. To learn more about registering things in the service container, check out [the documentation](/docs/5.0/container).
Copy file name to clipboardExpand all lines: controllers.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ You may access the name of the controller action being run using the `currentRou
76
76
<aname="controller-middleware"></a>
77
77
## Controller Middleware
78
78
79
-
[Middleware](/docs/master/middleware) may be specified on controller routes like so:
79
+
[Middleware](/docs/5.0/middleware) may be specified on controller routes like so:
80
80
81
81
Route::get('profile', [
82
82
'middleware' => 'auth',
@@ -212,7 +212,7 @@ If it becomes necessary to add additional routes to a resource controller beyond
212
212
213
213
#### Constructor Injection
214
214
215
-
The Laravel [service container](/docs/master/container) is used to resolve all Laravel controllers. As a result, you are able to type-hint any dependencies your controller may need in its constructor:
215
+
The Laravel [service container](/docs/5.0/container) is used to resolve all Laravel controllers. As a result, you are able to type-hint any dependencies your controller may need in its constructor:
216
216
217
217
<?php namespace App\Http\Controllers;
218
218
@@ -239,7 +239,7 @@ The Laravel [service container](/docs/master/container) is used to resolve all L
239
239
240
240
}
241
241
242
-
Of course, you may also type-hint any [Laravel contract](/docs/master/contracts). If the container can resolve it, you can type-hint it.
242
+
Of course, you may also type-hint any [Laravel contract](/docs/5.0/contracts). If the container can resolve it, you can type-hint it.
243
243
244
244
#### Method Injection
245
245
@@ -290,7 +290,7 @@ If your controller method is also expecting input from a route parameter, simply
290
290
291
291
}
292
292
293
-
> **Note:** Method injection is fully compatible with [model binding](/docs/master/routing#route-model-binding). The container will intelligently determine which arguments are model bound and which arguments should be injected.
293
+
> **Note:** Method injection is fully compatible with [model binding](/docs/5.0/routing#route-model-binding). The container will intelligently determine which arguments are model bound and which arguments should be injected.
0 commit comments