From 4deba2bfca6636d5cdcede3f2068eff3b59c15ce Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 4 Feb 2015 10:01:08 -0600 Subject: [PATCH] Replace links. --- artisan.md | 2 +- authentication.md | 12 +++--- billing.md | 2 +- bus.md | 6 +-- collections.md | 2 +- commands.md | 2 +- configuration.md | 8 ++-- container.md | 4 +- contracts.md | 4 +- controllers.md | 8 ++-- documentation.md | 96 +++++++++++++++++++++++------------------------ eloquent.md | 2 +- events.md | 2 +- filesystem.md | 2 +- installation.md | 4 +- lifecycle.md | 4 +- localization.md | 2 +- mail.md | 2 +- migrations.md | 2 +- packages.md | 2 +- pagination.md | 2 +- providers.md | 6 +-- queues.md | 4 +- redis.md | 2 +- releases.md | 24 ++++++------ requests.md | 4 +- responses.md | 10 ++--- routing.md | 6 +-- session.md | 2 +- upgrade.md | 14 +++---- views.md | 6 +-- 31 files changed, 124 insertions(+), 124 deletions(-) diff --git a/artisan.md b/artisan.md index 7532c583125..39669fe6f9b 100644 --- a/artisan.md +++ b/artisan.md @@ -49,7 +49,7 @@ Sometimes you may wish to execute an Artisan command outside of the CLI. For exa // }); -You may even queue Artisan commands so they are processed in the background by your [queue workers](/docs/master/queues): +You may even queue Artisan commands so they are processed in the background by your [queue workers](/docs/5.0/queues): Route::get('/foo', function() { diff --git a/authentication.md b/authentication.md index 72a49ed9eb2..8fe788d53d6 100644 --- a/authentication.md +++ b/authentication.md @@ -58,7 +58,7 @@ If you choose not to use the provided `AuthController` implementation, you will } -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. +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. The `attempt` method will return `true` if authentication was successful. Otherwise, `false` will be returned. @@ -140,7 +140,7 @@ Of course, if you are using the built-in Laravel authentication controllers, a c #### Authentication Events -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. +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. ## Retrieving The Authenticated User @@ -194,7 +194,7 @@ Second, you may access the authenticated user via an `Illuminate\Http\Request` i } -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): +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): ## Protecting Routes -[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: +[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: // With A Route Closure... @@ -247,7 +247,7 @@ By default, the `basic` middleware will use the `email` column on the user recor #### Setting Up A Stateless HTTP Basic Filter -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: +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: public function handle($request, Closure $next) { @@ -293,7 +293,7 @@ To get started with Socialite, include the package in your `composer.json` file: "laravel/socialite": "~2.0" -Next, register the `Laravel\Socialite\SocialiteServiceProvider` in your `config/app.php` configuration file. You may also register a [facade](/docs/master/facades): +Next, register the `Laravel\Socialite\SocialiteServiceProvider` in your `config/app.php` configuration file. You may also register a [facade](/docs/5.0/facades): 'Socialize' => 'Laravel\Socialite\Facades\Socialite', diff --git a/billing.md b/billing.md index 9850ff2c1ab..460119f2136 100644 --- a/billing.md +++ b/billing.md @@ -156,7 +156,7 @@ To verify that a user is subscribed to your application, use the `subscribed` co // } -The `subscribed` method makes a great candidate for a [route middleware](/docs/master/middleware): +The `subscribed` method makes a great candidate for a [route middleware](/docs/5.0/middleware): public function handle($request, Closure $next) { diff --git a/bus.md b/bus.md index 2cf87cb409f..c001454f2bf 100644 --- a/bus.md +++ b/bus.md @@ -55,7 +55,7 @@ The newly generated class will be placed in the `app/Commands` directory. By def } -The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example: +The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/5.0/container). For example: /** * Execute the command. @@ -116,7 +116,7 @@ If you would like to convert an existing command into a queued command, simply i 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. -For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues). +For more information on interacting with queued commands, view the full [queue documentation](/docs/5.0/queues). ## Command Pipeline @@ -141,7 +141,7 @@ A command pipe is defined with a `handle` method, just like a middleware: } -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. +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. You may even define a `Closure` as a command pipe: diff --git a/collections.md b/collections.md index b2e3cd53c78..1d09c70ac26 100644 --- a/collections.md +++ b/collections.md @@ -31,7 +31,7 @@ As mentioned above, the `collect` helper will return a new `Illuminate\Support\C $collection = Collection::make([1, 2, 3]); -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. +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. #### Explore The Collection diff --git a/commands.md b/commands.md index a9c22ca4d7c..92ad11d4bc0 100644 --- a/commands.md +++ b/commands.md @@ -122,4 +122,4 @@ Sometimes you may wish to call other commands from your command. You may do so u #### Registering An Artisan Command -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. +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. diff --git a/configuration.md b/configuration.md index 2ffab5d38f0..8fdaf43fcd7 100644 --- a/configuration.md +++ b/configuration.md @@ -30,7 +30,7 @@ Renaming your application is entirely optional, and you are free to keep the `Ap 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. -Once Laravel is installed, you should also [configure your local environment](/docs/master/configuration#environment-configuration). +Once Laravel is installed, you should also [configure your local environment](/docs/5.0/configuration#environment-configuration). > **Note:** You should never have the `app.debug` configuration option set to `true` for a production application. @@ -83,7 +83,7 @@ You may also pass arguments to the `environment` method to check if the environm // The environment is either local OR staging... } -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. +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. An application instance may also be accessed via the `app` helper of the `App` facade: @@ -117,7 +117,7 @@ The default template for maintenance mode responses is located in `resources/vie ### Maintenance Mode & Queues -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. +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. ## Pretty URLs @@ -143,4 +143,4 @@ On Nginx, the following directive in your site configuration will allow "pretty" try_files $uri $uri/ /index.php?$query_string; } -Of course, when using [Homestead](/docs/master/homestead), pretty URLs will be configured automatically. +Of course, when using [Homestead](/docs/5.0/homestead), pretty URLs will be configured automatically. diff --git a/container.md b/container.md index 0b0f1142016..a693ee8c45a 100644 --- a/container.md +++ b/container.md @@ -61,7 +61,7 @@ A deep understanding of the Laravel service container is essential to building a ### Binding -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. +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. #### Registering A Basic Resolver @@ -295,7 +295,7 @@ Laravel provides several opportunities to use the service container to increase } -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. +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. #### Other Examples Of Container Usage diff --git a/contracts.md b/contracts.md index 6c5bf1cf483..effefab6bba 100644 --- a/contracts.md +++ b/contracts.md @@ -136,7 +136,7 @@ Contract | Laravel 4.x Facade ## How To Use Contracts -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: +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: ## Controller Middleware -[Middleware](/docs/master/middleware) may be specified on controller routes like so: +[Middleware](/docs/5.0/middleware) may be specified on controller routes like so: Route::get('profile', [ 'middleware' => 'auth', @@ -212,7 +212,7 @@ If it becomes necessary to add additional routes to a resource controller beyond #### Constructor Injection -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: +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: **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. +> **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. ## Route Caching diff --git a/documentation.md b/documentation.md index cdf96874a2b..b05cccfba27 100755 --- a/documentation.md +++ b/documentation.md @@ -1,55 +1,55 @@ - Prologue - - [Release Notes](/docs/master/releases) - - [Upgrade Guide](/docs/master/upgrade) - - [Contribution Guide](/docs/master/contributions) + - [Release Notes](/docs/5.0/releases) + - [Upgrade Guide](/docs/5.0/upgrade) + - [Contribution Guide](/docs/5.0/contributions) - Setup - - [Installation](/docs/master/installation) - - [Configuration](/docs/master/configuration) - - [Homestead](/docs/master/homestead) + - [Installation](/docs/5.0/installation) + - [Configuration](/docs/5.0/configuration) + - [Homestead](/docs/5.0/homestead) - The Basics - - [Routing](/docs/master/routing) - - [Middleware](/docs/master/middleware) - - [Controllers](/docs/master/controllers) - - [Requests](/docs/master/requests) - - [Responses](/docs/master/responses) - - [Views](/docs/master/views) + - [Routing](/docs/5.0/routing) + - [Middleware](/docs/5.0/middleware) + - [Controllers](/docs/5.0/controllers) + - [Requests](/docs/5.0/requests) + - [Responses](/docs/5.0/responses) + - [Views](/docs/5.0/views) - Architecture Foundations - - [Service Providers](/docs/master/providers) - - [Service Container](/docs/master/container) - - [Contracts](/docs/master/contracts) - - [Facades](/docs/master/facades) - - [Request Lifecycle](/docs/master/lifecycle) - - [Application Structure](/docs/master/structure) + - [Service Providers](/docs/5.0/providers) + - [Service Container](/docs/5.0/container) + - [Contracts](/docs/5.0/contracts) + - [Facades](/docs/5.0/facades) + - [Request Lifecycle](/docs/5.0/lifecycle) + - [Application Structure](/docs/5.0/structure) - Services - - [Authentication](/docs/master/authentication) - - [Billing](/docs/master/billing) - - [Cache](/docs/master/cache) - - [Collections](/docs/master/collections) - - [Command Bus](/docs/master/bus) - - [Core Extension](/docs/master/extending) - - [Elixir](/docs/master/elixir) - - [Encryption](/docs/master/encryption) - - [Errors & Logging](/docs/master/errors) - - [Events](/docs/master/events) - - [Filesystem / Cloud Storage](/docs/master/filesystem) - - [Hashing](/docs/master/hashing) - - [Helpers](/docs/master/helpers) - - [Localization](/docs/master/localization) - - [Mail](/docs/master/mail) - - [Package Development](/docs/master/packages) - - [Pagination](/docs/master/pagination) - - [Queues](/docs/master/queues) - - [Session](/docs/master/session) - - [Templates](/docs/master/templates) - - [Unit Testing](/docs/master/testing) - - [Validation](/docs/master/validation) + - [Authentication](/docs/5.0/authentication) + - [Billing](/docs/5.0/billing) + - [Cache](/docs/5.0/cache) + - [Collections](/docs/5.0/collections) + - [Command Bus](/docs/5.0/bus) + - [Core Extension](/docs/5.0/extending) + - [Elixir](/docs/5.0/elixir) + - [Encryption](/docs/5.0/encryption) + - [Errors & Logging](/docs/5.0/errors) + - [Events](/docs/5.0/events) + - [Filesystem / Cloud Storage](/docs/5.0/filesystem) + - [Hashing](/docs/5.0/hashing) + - [Helpers](/docs/5.0/helpers) + - [Localization](/docs/5.0/localization) + - [Mail](/docs/5.0/mail) + - [Package Development](/docs/5.0/packages) + - [Pagination](/docs/5.0/pagination) + - [Queues](/docs/5.0/queues) + - [Session](/docs/5.0/session) + - [Templates](/docs/5.0/templates) + - [Unit Testing](/docs/5.0/testing) + - [Validation](/docs/5.0/validation) - Database - - [Basic Usage](/docs/master/database) - - [Query Builder](/docs/master/queries) - - [Eloquent ORM](/docs/master/eloquent) - - [Schema Builder](/docs/master/schema) - - [Migrations & Seeding](/docs/master/migrations) - - [Redis](/docs/master/redis) + - [Basic Usage](/docs/5.0/database) + - [Query Builder](/docs/5.0/queries) + - [Eloquent ORM](/docs/5.0/eloquent) + - [Schema Builder](/docs/5.0/schema) + - [Migrations & Seeding](/docs/5.0/migrations) + - [Redis](/docs/5.0/redis) - Artisan CLI - - [Overview](/docs/master/artisan) - - [Development](/docs/master/commands) + - [Overview](/docs/5.0/artisan) + - [Development](/docs/5.0/commands) diff --git a/eloquent.md b/eloquent.md index 4a98aaafff4..6d76acf3746 100644 --- a/eloquent.md +++ b/eloquent.md @@ -118,7 +118,7 @@ You may also specify which database connection should be used when running an El $user = User::on('connection-name')->find(1); -If you are using [read / write connections](/docs/master/database#read-write-connections), you may force the query to use the "write" connection with the following method: +If you are using [read / write connections](/docs/5.0/database#read-write-connections), you may force the query to use the "write" connection with the following method: $user = User::onWriteConnection()->find(1); diff --git a/events.md b/events.md index 1b60419c5ca..df298a6000b 100644 --- a/events.md +++ b/events.md @@ -71,7 +71,7 @@ Sometimes, you may wish to stop the propagation of an event to other listeners. ## Queued Event Handlers -Need to [queue](/docs/master/queues) an event handler? It couldn't be any easier. When generating the handler, simply use the `--queued` flag: +Need to [queue](/docs/5.0/queues) an event handler? It couldn't be any easier. When generating the handler, simply use the `--queued` flag: php artisan handler:event SendPurchaseConfirmation --event=PodcastWasPurchased --queued diff --git a/filesystem.md b/filesystem.md index 13bba1b1b18..3d14885610d 100644 --- a/filesystem.md +++ b/filesystem.md @@ -28,7 +28,7 @@ When using the `local` driver, note that all file operations are relative to the ## Basic Usage -The `Storage` facade may be used to interact with any of your configured disks. Alternatively, you may type-hint the `Illuminate\Contracts\Filesystem\Factory` contract on any class that is resolved via the [IoC container](/docs/master/container). +The `Storage` facade may be used to interact with any of your configured disks. Alternatively, you may type-hint the `Illuminate\Contracts\Filesystem\Factory` contract on any class that is resolved via the [IoC container](/docs/5.0/container). #### Retrieving A Particular Disk diff --git a/installation.md b/installation.md index 3b0b60935fc..43e984fba21 100644 --- a/installation.md +++ b/installation.md @@ -51,7 +51,7 @@ Typically, this string should be 32 characters long. The key can be set in the ` Laravel needs almost no other 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 application. -Once Laravel is installed, you should also [configure your local environment](/docs/master/configuration#environment-configuration). +Once Laravel is installed, you should also [configure your local environment](/docs/5.0/configuration#environment-configuration). > **Note:** You should never have the `app.debug` configuration option set to `true` for a production application. @@ -84,4 +84,4 @@ On Nginx, the following directive in your site configuration will allow "pretty" try_files $uri $uri/ /index.php?$query_string; } -Of course, when using [Homestead](/docs/master/homestead), pretty URLs will be configured automatically. +Of course, when using [Homestead](/docs/5.0/homestead), pretty URLs will be configured automatically. diff --git a/lifecycle.md b/lifecycle.md index 4f8000eab78..fac198aedfc 100644 --- a/lifecycle.md +++ b/lifecycle.md @@ -20,7 +20,7 @@ If you don't understand all of the terms right away, don't lose heart! Just try The entry point for all requests to a Laravel application is the `public/index.php` file. All requests are directed to this file by your web server (Apache / Nginx) configuration. The `index.php` file doesn't contain much code. Rather, it is simply a starting point for loading the rest of the framework. -The `index.php` file loads the Composer generated autoloader definition, and then retrieves an instance of the Laravel application from `bootstrap/app.php` script. The first action taken by Laravel itself is to create an instance of the application / [service container](/docs/master/container). +The `index.php` file loads the Composer generated autoloader definition, and then retrieves an instance of the Laravel application from `bootstrap/app.php` script. The first action taken by Laravel itself is to create an instance of the application / [service container](/docs/5.0/container). #### HTTP / Console Kernels @@ -28,7 +28,7 @@ Next, the incoming request is sent to either the HTTP kernel or the console kern The HTTP kernel extends the `Illuminate\Foundation\Http\Kernel` class, which defines an array of `bootstrappers` that will be run before the request is executed. These bootstrappers configure error handling, configure logging, detect the application environment, and perform other tasks that need to be done before the request is actually handled. -The HTTP kernel also defines a list of HTTP [middleware](/docs/master/middleware) that all requests must pass through before being handled by the application. These middleware handle reading and writing the HTTP session, determine if the application is in maintenance mode, verifying the CSRF token, and more. +The HTTP kernel also defines a list of HTTP [middleware](/docs/5.0/middleware) that all requests must pass through before being handled by the application. These middleware handle reading and writing the HTTP session, determine if the application is in maintenance mode, verifying the CSRF token, and more. The method signature for the HTTP kernel's `handle` method is quite simple: receive a `Request` and return a `Response`. Think of the Kernel as being a big black box that represents your entire application. Feed it HTTP requests and it will return HTTP responses. diff --git a/localization.md b/localization.md index e3148c30d1e..9f9821b9c1f 100644 --- a/localization.md +++ b/localization.md @@ -101,7 +101,7 @@ Since the Laravel translator is powered by the Symfony Translation component, yo ## Validation -For localization for validation errors and messages, take a look at the documentation on Validation. +For localization for validation errors and messages, take a look at the documentation on Validation. ## Overriding Package Language Files diff --git a/mail.md b/mail.md index 61854f7ce43..a0b4778fad0 100644 --- a/mail.md +++ b/mail.md @@ -114,7 +114,7 @@ Note that the `$message` variable is always passed to e-mail views by the `Mail` #### Queueing A Mail Message -Since sending e-mail messages can drastically lengthen the response time of your application, many developers choose to queue e-mail messages for background sending. Laravel makes this easy using its built-in [unified queue API](/docs/master/queues). To queue a mail message, simply use the `queue` method on the `Mail` facade: +Since sending e-mail messages can drastically lengthen the response time of your application, many developers choose to queue e-mail messages for background sending. Laravel makes this easy using its built-in [unified queue API](/docs/5.0/queues). To queue a mail message, simply use the `queue` method on the `Mail` facade: Mail::queue('emails.welcome', $data, function($message) { diff --git a/migrations.md b/migrations.md index bb573920b0d..56e49b7ce78 100644 --- a/migrations.md +++ b/migrations.md @@ -9,7 +9,7 @@ ## Introduction -Migrations are a type of version control for your database. They allow a team to modify the database schema and stay up to date on the current schema state. Migrations are typically paired with the [Schema Builder](/docs/master/schema) to easily manage your application's schema. +Migrations are a type of version control for your database. They allow a team to modify the database schema and stay up to date on the current schema state. Migrations are typically paired with the [Schema Builder](/docs/5.0/schema) to easily manage your application's schema. ## Creating Migrations diff --git a/packages.md b/packages.md index 60eafb41f3a..43f111de08b 100644 --- a/packages.md +++ b/packages.md @@ -21,7 +21,7 @@ All Laravel packages are distributed via [Packagist](http://packagist.org) and [ ## Views -Your package's internal structure is entirely up to you; however, typically each package will contain one or more [service providers](/docs/master/providers). The service provider contains any [IoC](/docs/master/container) bindings, as well as instructions as to where package configuration, views, and translation files are located. +Your package's internal structure is entirely up to you; however, typically each package will contain one or more [service providers](/docs/5.0/providers). The service provider contains any [IoC](/docs/5.0/container) bindings, as well as instructions as to where package configuration, views, and translation files are located. ### Views diff --git a/pagination.md b/pagination.md index d75f7878ba4..05d2f6189fc 100644 --- a/pagination.md +++ b/pagination.md @@ -23,7 +23,7 @@ There are several ways to paginate items. The simplest is by using the `paginate #### Paginating An Eloquent Model -You may also paginate [Eloquent](/docs/master/eloquent) models: +You may also paginate [Eloquent](/docs/5.0/eloquent) models: $allUsers = User::paginate(15); diff --git a/providers.md b/providers.md index c5ed13bbb82..d78f5a12e7a 100644 --- a/providers.md +++ b/providers.md @@ -19,7 +19,7 @@ In this overview you will learn how to write your own service providers and regi ## Basic Provider Example -All service providers extend the `Illuminate\Support\ServiceProvider` class. This abstract class requires that you define at least one method on your provider: `register`. Within the `register` method, you should **only bind things into the [service container](/docs/master/container)**. You should never attempt to register any event listeners, routes, or any other piece of functionality within the `register` method. +All service providers extend the `Illuminate\Support\ServiceProvider` class. This abstract class requires that you define at least one method on your provider: `register`. Within the `register` method, you should **only bind things into the [service container](/docs/5.0/container)**. You should never attempt to register any event listeners, routes, or any other piece of functionality within the `register` method. The Artisan CLI can easily generate a new provider via the `make:provider` command: @@ -51,7 +51,7 @@ Now, let's take a look at a basic service provider: } -This service provider only defines a `register` method, and uses that method to define an implementation of `Riak\Contracts\Connection` in the service container. If you don't understand how the service container works, don't worry, [we'll cover that soon](/docs/master/container). +This service provider only defines a `register` method, and uses that method to define an implementation of `Riak\Contracts\Connection` in the service container. If you don't understand how the service container works, don't worry, [we'll cover that soon](/docs/5.0/container). This class is namespaced under `App\Providers` since that is the default location for service providers in Laravel. However, you are free to change this as you wish. Your service providers may be placed anywhere that Composer can autoload them. @@ -113,7 +113,7 @@ To register your provider, simply add it to the array: ## Deferred Providers -If your provider is **only** registering bindings in the [service container](/docs/master/container), you may choose to defer its registration until one of the registered bindings is actually needed. Deferring the loading of such a provider will improve the performance of your application, since it is not loaded from the filesystem on every request. +If your provider is **only** registering bindings in the [service container](/docs/5.0/container), you may choose to defer its registration until one of the registered bindings is actually needed. Deferring the loading of such a provider will improve the performance of your application, since it is not loaded from the filesystem on every request. To defer the loading of a provider, set the `defer` property to `true` and define a `provides` method. The `provides` method returns the service container bindings that the provider registers: diff --git a/queues.md b/queues.md index e2999a10ec3..122610c1580 100644 --- a/queues.md +++ b/queues.md @@ -43,9 +43,9 @@ To push a new job onto the queue, use the `Queue::push` method: Queue::push(new SendEmail($message)); -> **Note:** In this example, we are using the `Queue` facade directly; however, typically you would dispatch queued command via the [Command Bus](/docs/master/bus). We will continue to use the `Queue` facade throughout this page; however, familiarize with the command bus as well, since it is used to dispatch both queued and synchronous commands for your application. +> **Note:** In this example, we are using the `Queue` facade directly; however, typically you would dispatch queued command via the [Command Bus](/docs/5.0/bus). We will continue to use the `Queue` facade throughout this page; however, familiarize with the command bus as well, since it is used to dispatch both queued and synchronous commands for your application. -By default, the `make:command` Artisan command generates a "self-handling" command, meaning a `handle` method is added to the command itself. This method will be called when the job is executed by the queue. You may type-hint any dependencies you need on the `handle` method and the [IoC container](/docs/master/container) will automatically inject them: +By default, the `make:command` Artisan command generates a "self-handling" command, meaning a `handle` method is added to the command itself. This method will be called when the job is executed by the queue. You may type-hint any dependencies you need on the `handle` method and the [IoC container](/docs/5.0/container) will automatically inject them: public function handle(UserRepository $users) { diff --git a/redis.md b/redis.md index d7cdea3233b..06252cb8f16 100644 --- a/redis.md +++ b/redis.md @@ -64,7 +64,7 @@ When you are simply executing commands against the default connection, just use $values = Redis::lrange('names', 5, 10); -> **Note:** Redis [cache](/docs/master/cache) and [session](/docs/master/session) drivers are included with Laravel. +> **Note:** Redis [cache](/docs/5.0/cache) and [session](/docs/5.0/session) drivers are included with Laravel. ## Pipelining diff --git a/releases.md b/releases.md index 6f6014ddc26..5336cb9db13 100644 --- a/releases.md +++ b/releases.md @@ -23,7 +23,7 @@ Application language files and views have been moved to the `resources` director All major Laravel components implement interfaces which are located in the `illuminate/contracts` repository. This repository has no external dependencies. Having a convenient, centrally located set of interfaces you may use for decoupling and dependency injection will serve as an easy alternative option to Laravel Facades. -For more information on contracts, consult the [full documentation](/docs/master/contracts). +For more information on contracts, consult the [full documentation](/docs/5.0/contracts). ### Route Cache @@ -33,11 +33,11 @@ If your application is made up entirely of controller routes, you may utilize th In addition to Laravel 4 style route "filters", Laravel 5 now supports HTTP middleware, and the included authentication and CSRF "filters" have been converted to middleware. Middleware provides a single, consistent interface to replace all types of filters, allowing you to easily inspect, and even reject, requests before they enter your application. -For more information on middleware, check out [the documentation](/docs/master/middleware). +For more information on middleware, check out [the documentation](/docs/5.0/middleware). ### Controller Method Injection -In addition to the existing constructor injection, you may now type-hint dependencies on controller methods. The [IoC container](/docs/master/container) will automatically inject the dependencies, even if the route contains other parameters: +In addition to the existing constructor injection, you may now type-hint dependencies on controller methods. The [IoC container](/docs/5.0/container) will automatically inject the dependencies, even if the route contains other parameters: public function createPost(Request $request, PostRepository $posts) { @@ -78,7 +78,7 @@ Of course, your event handler will receive the event object instead of a list of } -For more information on working with events, check out the [full documentation](/docs/master/events). +For more information on working with events, check out the [full documentation](/docs/5.0/events). ### Commands / Queueing @@ -119,7 +119,7 @@ The base Laravel controller utilizes the new `DispatchesCommands` trait, allowin $this->dispatch(new PurchasePodcastCommand($user, $podcast)); -Of course, you may also use commands for tasks that are executed synchonrously (are not queued). In fact, using commands is a great way to encapsulate complex tasks your application needs to perform. For more information, check out the [command bus](/docs/master/bus) documentation. +Of course, you may also use commands for tasks that are executed synchonrously (are not queued). In fact, using commands is a great way to encapsulate complex tasks your application needs to perform. For more information, check out the [command bus](/docs/5.0/bus) documentation. ### Database Queue @@ -133,7 +133,7 @@ It looks like this: $schedule->command('artisan:command')->dailyAt('15:00'); -Of course, check out the [full documentation](/docs/master/artisan#scheduling-artisan-commands) to learn all about the scheduler! +Of course, check out the [full documentation](/docs/5.0/artisan#scheduling-artisan-commands) to learn all about the scheduler! ### Tinker / Psysh @@ -143,13 +143,13 @@ The `php artisan tinker` command now utilizes [Psysh](https://github.com/bobthec ### DotEnv -Instead of a variety of confusing, nested environment configuration directories, Laravel 5 now utilizes [DotEnv](https://github.com/vlucas/phpdotenv) by Vance Lucas. This library provides a super simple way to manage your environment configuration, and makes environment detection in Laravel 5 a breeze. For more details, check out the full [configuration documentation](/docs/master/configuration#environment-configuration). +Instead of a variety of confusing, nested environment configuration directories, Laravel 5 now utilizes [DotEnv](https://github.com/vlucas/phpdotenv) by Vance Lucas. This library provides a super simple way to manage your environment configuration, and makes environment detection in Laravel 5 a breeze. For more details, check out the full [configuration documentation](/docs/5.0/configuration#environment-configuration). ### Laravel Elixir Laravel Elixir, by Jeffrey Way, provides a fluent, expressive interface to compiling and concatenating your assets. If you've ever been intimidated by learning Grunt or Gulp, fear no more. Elixir makes it a cinch to get started using Gulp to compile your Less, Sass, and CoffeeScript. It can even run your tests for you! -For more information on Elixir, check out the [full documentation](/docs/master/elixir). +For more information on Elixir, check out the [full documentation](/docs/5.0/elixir). ### Laravel Socialite @@ -165,7 +165,7 @@ Laravel Socialite is an optional, Laravel 5.0+ compatible package that provides $user = Socialize::with('twitter')->user(); } -No more spending hours writing OAuth authentication flows. Get started in minutes! The [full documentation](/docs/master/authentication#social-authentication) has all the details. +No more spending hours writing OAuth authentication flows. Get started in minutes! The [full documentation](/docs/5.0/authentication#social-authentication) has all the details. ### Flysystem Integration @@ -173,7 +173,7 @@ Laravel now includes the powerful [Flysystem](https://github.com/thephpleague/fl Storage::put('file.txt', 'contents'); -For more information on the Laravel Flysystem integration, consult the [full documentation](/docs/master/filesystem). +For more information on the Laravel Flysystem integration, consult the [full documentation](/docs/5.0/filesystem). ### Form Requests @@ -205,7 +205,7 @@ Once the class has been defined, we can type-hint it on our controller action: var_dump($request->input()); } -When the Laravel IoC container identifies that the class it is injecting is a `FormRequest` instance, the request will **automatically be validated**. This means that if your controller action is called, you can safely assume the HTTP request input has been validated according to the rules you specified in your form request class. Even more, if the request is invalid, an HTTP redirect, which you may customize, will automatically be issued, and the error messages will be either flashed to the session or converted to JSON. **Form validation has never been more simple.** For more information on `FormRequest` validation, check out the [documentation](/docs/master/validation#form-request-validation). +When the Laravel IoC container identifies that the class it is injecting is a `FormRequest` instance, the request will **automatically be validated**. This means that if your controller action is called, you can safely assume the HTTP request input has been validated according to the rules you specified in your form request class. Even more, if the request is invalid, an HTTP redirect, which you may customize, will automatically be issued, and the error messages will be either flashed to the session or converted to JSON. **Form validation has never been more simple.** For more information on `FormRequest` validation, check out the [documentation](/docs/5.0/validation#form-request-validation). ### Simple Controller Request Validation @@ -221,7 +221,7 @@ The Laravel 5 base controller now includes a `ValidatesRequests` trait. This tra If the validation fails, an exception will be thrown and the proper HTTP response will automatically be sent back to the browser. The validation errors will even be flashed to the session.! If the request was an AJAX request, Laravel even takes care of sending a JSON representation of the validation errors back to you. -For more information on this new method, check out [the documentation](/docs/master/validation#controller-validation). +For more information on this new method, check out [the documentation](/docs/5.0/validation#controller-validation). ### New Generators diff --git a/requests.md b/requests.md index cf911034da2..edce281512e 100644 --- a/requests.md +++ b/requests.md @@ -20,7 +20,7 @@ Remember, if you are in a namespace, you will have to import the `Request` facad ### Via Dependency Injection -To obtain an instance of the current HTTP request via dependency injection, you should type-hint the class on your controller constructor or method. The current request instance will automatically be injected by the [service container](/docs/master/container): +To obtain an instance of the current HTTP request via dependency injection, you should type-hint the class on your controller constructor or method. The current request instance will automatically be injected by the [service container](/docs/5.0/container): with('message', 'Login Failed'); @@ -101,7 +101,7 @@ If you are redirecting to a route with an "ID" parameter that is being populated #### Returning A Redirect To A Controller Action -Similarly to generating `RedirectResponse` instances to named routes, you may also generate redirects to [controller actions](/docs/master/controllers): +Similarly to generating `RedirectResponse` instances to named routes, you may also generate redirects to [controller actions](/docs/5.0/controllers): return redirect()->action('App\Http\Controllers\HomeController@index'); @@ -118,7 +118,7 @@ Similarly to generating `RedirectResponse` instances to named routes, you may al ## Other Responses -The `response` helper may be used to conveniently generate other types of response instances. When the `response` helper is called without arguments, an implementation of the `Illuminate\Contracts\Routing\ResponseFactory` [contract](/docs/master/contracts) is returned. This contract provides several helpful methods for generating responses. +The `response` helper may be used to conveniently generate other types of response instances. When the `response` helper is called without arguments, an implementation of the `Illuminate\Contracts\Routing\ResponseFactory` [contract](/docs/5.0/contracts) is returned. This contract provides several helpful methods for generating responses. #### Creating A JSON Response @@ -144,7 +144,7 @@ The `json` method will automatically set the `Content-Type` header to `applicati If you would like to define a custom response that you can re-use in a variety of your routes and controllers, you may use the `macro` method on an implementation of `Illuminate\Contracts\Routing\ResponseFactory`. -For example, from a [service provider's](/docs/master/providers) `boot` method: +For example, from a [service provider's](/docs/5.0/providers) `boot` method: "> -Of course, using the Blade [templating engine](/docs/master/templating): +Of course, using the Blade [templating engine](/docs/5.0/templating): -You do not need to manually verify the CSRF token on POST, PUT, or DELETE requests. The `VerifyCsrfToken` [HTTP middleware](/docs/master/middleware) will verify token in the request input matches the token stored in the session. +You do not need to manually verify the CSRF token on POST, PUT, or DELETE requests. The `VerifyCsrfToken` [HTTP middleware](/docs/5.0/middleware) will verify token in the request input matches the token stored in the session. In addition to looking for the CSRF token as a "POST" parameter, the middleware will also check for the `X-XSRF-TOKEN` request header, which is commonly used by JavaScript frameworks. @@ -306,4 +306,4 @@ The `abort` helper simply throws a `Symfony\Component\HttpFoundation\Exception\H Secondly, you may manually throw an instance of `Symfony\Component\HttpKernel\Exception\NotFoundHttpException`. -More information on handling 404 exceptions and using custom responses for these errors may be found in the [errors](/docs/master/errors#http-exceptions) section of the documentation. +More information on handling 404 exceptions and using custom responses for these errors may be found in the [errors](/docs/5.0/errors#http-exceptions) section of the documentation. diff --git a/session.md b/session.md index 2353cb84149..e4733a2ef6d 100644 --- a/session.md +++ b/session.md @@ -115,4 +115,4 @@ The session "driver" defines where session data will be stored for each request. - `memcached` / `redis` - sessions will be stored in one of these fast, cached based stores. - `array` - sessions will be stored in a simple PHP array and will not be persisted across requests. -> **Note:** The array driver is typically used for running [unit tests](/docs/master/testing), so no session data will be persisted. +> **Note:** The array driver is typically used for running [unit tests](/docs/5.0/testing), so no session data will be persisted. diff --git a/upgrade.md b/upgrade.md index 57aa7ff6939..dde399578e4 100644 --- a/upgrade.md +++ b/upgrade.md @@ -13,7 +13,7 @@ The recommended method of upgrading is to create a new Laravel `5.0` install and then to copy your `4.2` site's unique application files into the new application. This would include controllers, routes, Eloquent models, Artisan commands, assets, and other code specific to your application. -To start, [install a new Laravel 5 application](/docs/master/installation) into a fresh directory in your local environment. We'll discuss each piece of the migration process in further detail below. +To start, [install a new Laravel 5 application](/docs/5.0/installation) into a fresh directory in your local environment. We'll discuss each piece of the migration process in further detail below. ### Composer Dependencies & Packages @@ -33,7 +33,7 @@ Copy the new `.env.example` file to `.env`, which is the `5.0` equivalent of the Additionally, copy any custom values you had in your old `.env.php` file and place them in both `.env` (the real value for your local environment) and `.env.example` (a sample instructional value for other team members). -For more information on environment configuration, view the [full documentation](/docs/master/configuration#environment-configuration). +For more information on environment configuration, view the [full documentation](/docs/5.0/configuration#environment-configuration). > **Note:** You will need to place the appropriate `.env` file and values on your production server before deploying your Laravel 5 application. @@ -65,7 +65,7 @@ Filters are not removed in Laravel 5. You can still bind and use your own custom ### Global CSRF -By default, [CSRF protection](/docs/master/routing#csrf-protection) is enabled on all routes. If you'd like to disable this, or only manually enable it on certain routes, remove this line from `App\Http\Kernel`'s `middleware` array: +By default, [CSRF protection](/docs/5.0/routing#csrf-protection) is enabled on all routes. If you'd like to disable this, or only manually enable it on certain routes, remove this line from `App\Http\Kernel`'s `middleware` array: 'App\Http\Middleware\VerifyCsrfToken', @@ -73,7 +73,7 @@ If you want to use it elsewhere, add this line to `$routeMiddleware`: 'csrf' => 'App\Http\Middleware\VerifyCsrfToken', -Now you can add the middleware to individual routes / controllers using `['middleware' => 'csrf']` on the route. For more information on middleware, consult the [full documentation](/docs/master/middleware). +Now you can add the middleware to individual routes / controllers using `['middleware' => 'csrf']` on the route. For more information on middleware, consult the [full documentation](/docs/5.0/middleware). ### Eloquent Models @@ -83,7 +83,7 @@ Update any models using `SoftDeletingTrait` to use `Illuminate\Database\Eloquent #### Eloquent Caching -Eloquent no longer provides the `remember` method for caching queries. You now are responsible for caching your queries manually using the `Cache::remember` function. For more information on caching, consult the [full documentation](/docs/master/cache). +Eloquent no longer provides the `remember` method for caching queries. You now are responsible for caching your queries manually using the `Cache::remember` function. For more information on caching, consult the [full documentation](/docs/5.0/cache). ### User Authentication Model @@ -121,7 +121,7 @@ use Authenticatable, CanResetPassword; ### Cashier User Changes -The name of the trait and interface used by [Laravel Cashier](/docs/master/billing) has changed. Instead of using `BillableTrait`, use the `Laravel\Cashier\Billable` trait. And, instead of `Larave\Cashier\BillableInterface` implement the `Laravel\Cashier\Contracts\Billable` interface instead. No other method changes are required. +The name of the trait and interface used by [Laravel Cashier](/docs/5.0/billing) has changed. Instead of using `BillableTrait`, use the `Laravel\Cashier\Billable` trait. And, instead of `Larave\Cashier\BillableInterface` implement the `Laravel\Cashier\Contracts\Billable` interface instead. No other method changes are required. ### Artisan Commands @@ -137,7 +137,7 @@ Move all of your migration classes from the old `app/database/migrations` direct ### Global IoC Bindings -If you have any [IoC](/docs/master/container) bindings in `start/global.php`, move them all to the `register` method of the `app/Providers/AppServiceProvider.php` file. You may need to import the `App` facade. +If you have any [IoC](/docs/5.0/container) bindings in `start/global.php`, move them all to the `register` method of the `app/Providers/AppServiceProvider.php` file. You may need to import the `App` facade. Optionally, you may break these bindings up into separate service providers by category. diff --git a/views.md b/views.md index a6457e06f8a..1613a7f5b64 100644 --- a/views.md +++ b/views.md @@ -47,7 +47,7 @@ If you wish, you may pass an array of data as the second parameter to the `view` #### Sharing Data With All Views -Occasionally, you may need to share a piece of data with all views that are rendered by your application. You have several options: the `view` helper, the `Illuminate\Contracts\View\Factory` [contract](/docs/master/contracts), or a wildcard [view composer](#view-composers). +Occasionally, you may need to share a piece of data with all views that are rendered by your application. You have several options: the `view` helper, the `Illuminate\Contracts\View\Factory` [contract](/docs/5.0/contracts), or a wildcard [view composer](#view-composers). For example, using the `view` helper: @@ -83,7 +83,7 @@ View composers are callbacks or class methods that are called when a view is ren #### Defining A View Composer -Let's organize our view composers within a [service provider](/docs/master/providers). We'll use the `View` facade to access the underlying `Illuminate\Contracts\View\Factory` contract implementation: +Let's organize our view composers within a [service provider](/docs/5.0/providers). We'll use the `View` facade to access the underlying `Illuminate\Contracts\View\Factory` contract implementation: **Note:** All view composers are resolved via the [service container](/docs/master/container), so you may type-hint any dependencies you need within a composer's constructor. +> **Note:** All view composers are resolved via the [service container](/docs/5.0/container), so you may type-hint any dependencies you need within a composer's constructor. #### Wildcard View Composers