bhavin-gajjar/laravel-coder-lora-train huggingface dataset:
[Laravel 13] Explain filesystem: The Public Disk

The public disk included in your application's filesystems configuration file is intended for files that are going to be publicly accessible. By default, the public disk uses the local driver and stores its files in storage/app/public.

If your public disk uses the local driver and you want to make these files accessible from the web, you should create a symbolic link from source directory storage/app/public to target directory public/storage:

To create the symbolic link, you may use the storage:link Artisan command:

Once a file has been stored and the symbolic link has been created, you can create a URL to the files using the asset helper:

You may configure additional symbolic links in your filesystems configuration file. Each of the configured links will be created when you run the storage:link command:

The storage:unlink command may be used to destroy your configured symbolic links:

<a name="driver-prerequisites"></a>
[Laravel 13] Explain filesystem: S3 Driver Configuration

Before using the S3 driver, you will need to install the Flysystem S3 package via the Composer package manager:

An S3 disk configuration array is located in your config/filesystems.php configuration file. Typically, you should configure your S3 information and credentials using the following environment variables which are referenced by the config/filesystems.php configuration file:

For convenience, these environment variables match the naming convention used by the AWS CLI.

<a name="ftp-driver-configuration"></a>
[Laravel 13] Explain folio: Introduction

Laravel Folio is a powerful page based router designed to simplify routing in Laravel applications. With Laravel Folio, generating a route becomes as effortless as creating a Blade template within your application's resources/views/pages directory.

For example, to create a page that is accessible at the /greeting URL, just create a greeting.blade.php file in your application's resources/views/pages directory:

<a name="installation"></a>
[Laravel 13] Explain folio: Page Paths / URIs

By default, Folio serves pages from your application's resources/views/pages directory, but you may customize these directories in your Folio service provider's boot method.

For example, sometimes it may be convenient to specify multiple Folio paths in the same Laravel application. You may wish to have a separate directory of Folio pages for your application's "admin" area, while using another directory for the rest of your application's pages.

You may accomplish this using the Folio::path and Folio::uri methods. The path method registers a directory that Folio will scan for pages when routing incoming HTTP requests, while the uri method specifies the "base URI" for that directory of pages:

<a name="subdomain-routing"></a>
[Laravel 13] Explain folio: Subdomain Routing

You may also route to pages based on the incoming request's subdomain. For example, you may wish to route requests from admin.example.com to a different page directory than the rest of your Folio pages. You may accomplish this by invoking the domain method after invoking the Folio::path method:

The domain method also allows you to capture parts of the domain or subdomain as parameters. These parameters will be injected into your page template:

<a name="creating-routes"></a>
[Laravel 13] Explain folio: Creating Routes

You may create a Folio route by placing a Blade template in any of your Folio mounted directories. By default, Folio mounts the resources/views/pages directory, but you may customize these directories in your Folio service provider's boot method.

Once a Blade template has been placed in a Folio mounted directory, you may immediately access it via your browser. For example, a page placed in pages/schedule.blade.php may be accessed in your browser at http://example.com/schedule.

To quickly view a list of all of your Folio pages / routes, you may invoke the folio:list Artisan command:

<a name="nested-routes"></a>
[Laravel 13] Explain fortify: Laravel Fortify

- Introduction
    - What is Fortify?
    - When Should I Use Fortify?
- Installation
    - Fortify Features
    - Disabling Views
- Authentication
    - Customizing User Authentication
    - Customizing the Authentication Pipeline
    - Customizing Redirects
- Two-Factor Authentication
    - Enabling Two-Factor Authentication
    - Authenticating With Two-Factor Authentication
    - Disabling Two-Factor Authentication
- Passkeys
    - Enabling Passkeys
    - JavaScript Client
    - Authenticating With Passkeys
    - Confirming Password With Passkeys
    - Registering Passkeys
    - Deleting Passkeys
- Registration
    - Customizing Registration
- Password Reset
    - Requesting a Password Reset Link
    - Resetting the Password
    - Customizing Password Resets
- Email Verification
    - Protecting Routes
- Password Confirmation

<a name="introduction"></a>
[Laravel 13] Explain fortify: Introduction

Laravel Fortify is a frontend agnostic authentication backend implementation for Laravel. Fortify registers the routes and controllers needed to implement all of Laravel's authentication features, including login, registration, password reset, email verification, and more. After installing Fortify, you may run the route:list Artisan command to see the routes that Fortify has registered.

Since Fortify does not provide its own user interface, it is meant to be paired with your own user interface which makes requests to the routes it registers. We will discuss exactly how to make requests to these routes in the remainder of this documentation.

> [!NOTE]
> Remember, Fortify is a package that is meant to give you a head start implementing Laravel's authentication features. **You are not required to use it.** You are always free to manually interact with Laravel's authentication services by following the documentation available in the authentication, password reset, and email verification documentation.

<a name="what-is-fortify"></a>
[Laravel 13] Explain fortify: What is Fortify?

As mentioned previously, Laravel Fortify is a frontend agnostic authentication backend implementation for Laravel. Fortify registers the routes and controllers needed to implement all of Laravel's authentication features, including login, registration, password reset, email verification, and more.

**You are not required to use Fortify in order to use Laravel's authentication features.** You are always free to manually interact with Laravel's authentication services by following the documentation available in the authentication, password reset, and email verification documentation.

If you are new to Laravel, you may wish to explore our application starter kits. Laravel's application starter kits use Fortify internally to provide authentication scaffolding for your application that includes a user interface built with Tailwind CSS. This allows you to study and get comfortable with Laravel's authentication features.

Laravel Fortify essentially takes the routes and controllers of our application starter kits and offers them as a package that does not include a user interface. This allows you to still quickly scaffold the backend implementation of your application's authentication layer without being tied to any particular frontend opinions.

<a name="when-should-i-use-fortify"></a>
[Laravel 13] Explain fortify: When Should I Use Fortify?

You may be wondering when it is appropriate to use Laravel Fortify. First, if you are using one of Laravel's application starter kits, you do not need to install Laravel Fortify since all of Laravel's application starter kits use Fortify and already provide a full authentication implementation.

If you are not using an application starter kit and your application needs authentication features, you have two options: manually implement your application's authentication features or use Laravel Fortify to provide the backend implementation of these features.

If you choose to install Fortify, your user interface will make requests to Fortify's authentication routes that are detailed in this documentation in order to authenticate and register users.

If you choose to manually interact with Laravel's authentication services instead of using Fortify, you may do so by following the documentation available in the authentication, password reset, and email verification documentation.

<a name="laravel-fortify-and-laravel-sanctum"></a>
[Laravel 13] Explain fortify: Laravel Fortify and Laravel Sanctum

Some developers become confused regarding the difference between Laravel Sanctum and Laravel Fortify. Because the two packages solve two different but related problems, Laravel Fortify and Laravel Sanctum are not mutually exclusive or competing packages.

Laravel Sanctum is only concerned with managing API tokens and authenticating existing users using session cookies or tokens. Sanctum does not provide any routes that handle user registration, password reset, etc.

If you are attempting to manually build the authentication layer for an application that offers an API or serves as the backend for a single-page application, it is entirely possible that you will utilize both Laravel Fortify (for user registration, password reset, etc.) and Laravel Sanctum (API token management, session authentication).

<a name="installation"></a>
[Laravel 13] Explain fortify: Installation

To get started, install Fortify using the Composer package manager:

Next, publish Fortify's resources using the fortify:install Artisan command:

This command will publish Fortify's actions to your app/Actions directory, which will be created if it does not exist. In addition, the FortifyServiceProvider, configuration file, and all necessary database migrations will be published.

Next, you should migrate your database:

<a name="fortify-features"></a>
[Laravel 13] Explain frontend: Introduction

Laravel is a backend framework that provides all of the features you need to build modern web applications, such as routing, validation, caching, queues, file storage, and more. However, we believe it's important to offer developers a beautiful full-stack experience, including powerful approaches for building your application's frontend.

There are two primary ways to tackle frontend development when building an application with Laravel, and which approach you choose is determined by whether you would like to build your frontend by leveraging PHP or by using JavaScript frameworks such as React, Svelte, and Vue. We'll discuss both of these options below so that you can make an informed decision regarding the best approach to frontend development for your application.

<a name="using-php"></a>
[Laravel 13] Explain frontend: PHP and Blade

In the past, most PHP applications rendered HTML to the browser using simple HTML templates interspersed with PHP echo statements which render data that was retrieved from a database during the request:

In Laravel, this approach to rendering HTML can still be achieved using views and Blade. Blade is an extremely light-weight templating language that provides convenient, short syntax for displaying data, iterating over data, and more:

When building applications in this fashion, form submissions and other page interactions typically receive an entirely new HTML document from the server and the entire page is re-rendered by the browser. Even today, many applications may be perfectly suited to having their frontends constructed in this way using simple Blade templates.

<a name="growing-expectations"></a>
[Laravel 13] Explain frontend: Growing Expectations

However, as user expectations regarding web applications have matured, many developers have found the need to build more dynamic frontends with interactions that feel more polished. In light of this, some developers choose to begin building their application's frontend using JavaScript frameworks such as React, Svelte, and Vue.

Others, preferring to stick with the backend language they are comfortable with, have developed solutions that allow the construction of modern web application UIs while still primarily utilizing their backend language of choice. For example, in the Rails ecosystem, this has spurred the creation of libraries such as Turbo Hotwire, and Stimulus.

Within the Laravel ecosystem, the need to create modern, dynamic frontends by primarily using PHP has led to the creation of Laravel Livewire and Alpine.js.

<a name="livewire"></a>
[Laravel 13] Explain frontend: Livewire

Laravel Livewire is a framework for building Laravel powered frontends that feel dynamic, modern, and alive just like frontends built with modern JavaScript frameworks like React, Svelte, and Vue.

When using Livewire, you will create Livewire "components" that render a discrete portion of your UI and expose methods and data that can be invoked and interacted with from your application's frontend. For example, a simple "Counter" component might look like the following:

As you can see, Livewire enables you to write new HTML attributes such as wire:click that connect your Laravel application's frontend and backend. In addition, you can render your component's current state using simple Blade expressions.

For many, Livewire has revolutionized frontend development with Laravel, allowing them to stay within the comfort of Laravel while constructing modern, dynamic web applications. Typically, developers using Livewire will also utilize Alpine.js to "sprinkle" JavaScript onto their frontend only where it is needed, such as in order to render a dialog window.

If you're new to Laravel, we recommend getting familiar with the basic usage of views and Blade. Then, consult the official Laravel Livewire documentation to learn how to take your application to the next level with interactive Livewire components.

<a name="php-starter-kits"></a>
[Laravel 13] Explain hashing: Introduction

The Laravel Hash facade provides secure Bcrypt and Argon2 hashing for storing user passwords. If you are using one of the Laravel application starter kits, Bcrypt will be used for registration and authentication by default.

Bcrypt is a great choice for hashing passwords because its "work factor" is adjustable, which means that the time it takes to generate a hash can be increased as hardware power increases. When hashing passwords, slow is good. The longer an algorithm takes to hash a password, the longer it takes malicious users to generate "rainbow tables" of all possible string hash values that may be used in brute force attacks against applications.

<a name="configuration"></a>
[Laravel 13] Explain hashing: Configuration

By default, Laravel uses the bcrypt hashing driver when hashing data. However, several other hashing drivers are supported, including argon and argon2id.

You may specify your application's hashing driver using the HASH_DRIVER environment variable. But, if you want to customize all of Laravel's hashing driver options, you should publish the complete hashing configuration file using the config:publish Artisan command:

<a name="basic-usage"></a>
[Laravel 13] Explain hashing: Adjusting The Argon2 Work Factor

If you are using the Argon2 algorithm, the make method allows you to manage the work factor of the algorithm using the memory, time, and threads options; however, the default values managed by Laravel are acceptable for most applications:

> [!NOTE]
> For more information on these options, please refer to the official PHP documentation regarding Argon hashing.

<a name="verifying-that-a-password-matches-a-hash"></a>
[Laravel 13] Explain helpers: Available Methods

<style>
    .collection-method-list > p {
        columns: 10.8em 3; -moz-columns: 10.8em 3; -webkit-columns: 10.8em 3;
    }

    .collection-method-list a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
</style>

<a name="arrays-and-objects-method-list"></a>
[Laravel 13] Explain helpers: Arrays & Objects

<div class="collection-method-list" markdown="1">

Arr::accessible
Arr::add
Arr::array
Arr::boolean
Arr::collapse
Arr::crossJoin
Arr::divide
Arr::dot
Arr::every
Arr::except
Arr::exceptValues
Arr::exists
Arr::first
Arr::flatten
Arr::float
Arr::forget
Arr::from
Arr::get
Arr::has
Arr::hasAll
Arr::hasAny
Arr::integer
Arr::isAssoc
Arr::isList
Arr::join
Arr::keyBy
Arr::last
Arr::map
Arr::mapSpread
Arr::mapWithKeys
Arr::only
Arr::onlyValues
Arr::partition
Arr::pluck
Arr::prepend
Arr::prependKeysWith
Arr::pull
Arr::push
Arr::query
Arr::random
Arr::reject
Arr::select
Arr::set
Arr::shuffle
Arr::sole
Arr::some
Arr::sort
Arr::sortDesc
Arr::sortRecursive
Arr::string
Arr::take
Arr::toCssClasses
Arr::toCssStyles
Arr::undot
Arr::where
Arr::whereNotNull
Arr::wrap
data_fill
data_get
data_set
data_forget
head
last
</div>

<a name="numbers-method-list"></a>
[Laravel 13] Explain helpers: Numbers

<div class="collection-method-list" markdown="1">

Number::abbreviate
Number::clamp
Number::currency
Number::defaultCurrency
Number::defaultLocale
Number::fileSize
Number::forHumans
Number::format
Number::ordinal
Number::pairs
Number::parse
Number::parseInt
Number::parseFloat
Number::percentage
Number::spell
Number::spellOrdinal
Number::trim
Number::useLocale
Number::withLocale
Number::useCurrency
Number::withCurrency

</div>

<a name="paths-method-list"></a>
[Laravel 13] Explain homestead: Laravel Homestead

- Introduction
- Installation and Setup
    - First Steps
    - Configuring Homestead
    - Configuring Nginx Sites
    - Configuring Services
    - Launching the Vagrant Box
    - Per Project Installation
    - Installing Optional Features
    - Aliases
- Updating Homestead
- Daily Usage
    - Connecting via SSH
    - Adding Additional Sites
    - Environment Variables
    - Ports
    - PHP Versions
    - Connecting to Databases
    - Database Backups
    - Configuring Cron Schedules
    - Configuring Mailpit
    - Configuring Minio
    - Laravel Dusk
    - Sharing Your Environment
- Debugging and Profiling
    - Debugging Web Requests With Xdebug
    - Debugging CLI Applications
    - Profiling Applications With Blackfire
- Network Interfaces
- Extending Homestead
- Provider Specific Settings
    - VirtualBox

<a name="introduction"></a>
[Laravel 13] Explain homestead: Introduction

> [!WARNING]
> Laravel Homestead is a legacy package that is no longer actively maintained. Laravel Sail may be used as a modern alternative.

Laravel strives to make the entire PHP development experience delightful, including your local development environment. Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, or any other server software on your local machine.

Vagrant provides a simple, elegant way to manage and provision Virtual Machines. Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!

Homestead runs on any Windows, macOS, or Linux system and includes Nginx, PHP, MySQL, PostgreSQL, Redis, Memcached, Node, and all of the other software you need to develop amazing Laravel applications.

> [!WARNING]
> If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.

<a name="included-software"></a>
[Laravel 13] Explain homestead: Included Software

<style>
    #software-list > ul {
        column-count: 2; -moz-column-count: 2; -webkit-column-count: 2;
        column-gap: 5em; -moz-column-gap: 5em; -webkit-column-gap: 5em;
        line-height: 1.9;
    }
</style>

<div id="software-list" markdown="1">

- Ubuntu 22.04
- Git
- PHP 8.3
- PHP 8.2
- PHP 8.1
- PHP 8.0
- PHP 7.4
- PHP 7.3
- PHP 7.2
- PHP 7.1
- PHP 7.0
- PHP 5.6
- Nginx
- MySQL 8.0
- lmm
- Sqlite3
- PostgreSQL 15
- Composer
- Docker
- Node (With Yarn, Bower, Grunt, and Gulp)
- Redis
- Memcached
- Beanstalkd
- Mailpit
- avahi
- ngrok
- Xdebug
- XHProf / Tideways / XHGui
- wp-cli

</div>

<a name="optional-software"></a>
[Laravel 13] Explain homestead: Optional Software

<style>
    #software-list > ul {
        column-count: 2; -moz-column-count: 2; -webkit-column-count: 2;
        column-gap: 5em; -moz-column-gap: 5em; -webkit-column-gap: 5em;
        line-height: 1.9;
    }
</style>

<div id="software-list" markdown="1">

- Apache
- Blackfire
- Cassandra
- Chronograf
- CouchDB
- Crystal & Lucky Framework
- Elasticsearch
- EventStoreDB
- Flyway
- Gearman
- Go
- Grafana
- InfluxDB
- Logstash
- MariaDB
- Meilisearch
- MinIO
- MongoDB
- Neo4j
- Oh My Zsh
- Open Resty
- PM2
- Python
- R
- RabbitMQ
- Rust
- RVM (Ruby Version Manager)
- Solr
- TimescaleDB
- Trader <small>(PHP extension)</small>
- Webdriver & Laravel Dusk Utilities

</div>

<a name="installation-and-setup"></a>
[Laravel 13] Explain homestead: First Steps

Before launching your Homestead environment, you must install Vagrant as well as one of the following supported providers:

- VirtualBox 6.1.x
- Parallels

All of these software packages provide easy-to-use visual installers for all popular operating systems.

To use the Parallels provider, you will need to install Parallels Vagrant plug-in. It is free of charge.

<a name="installing-homestead"></a>
[Laravel 13] Explain homestead: Installing Homestead

You may install Homestead by cloning the Homestead repository onto your host machine. Consider cloning the repository into a Homestead folder within your "home" directory, as the Homestead virtual machine will serve as the host to all of your Laravel applications. Throughout this documentation, we will refer to this directory as your "Homestead directory":

After cloning the Laravel Homestead repository, you should checkout the release branch. This branch always contains the latest stable release of Homestead:

Next, execute the bash init.sh command from the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file is where you will configure all of the settings for your Homestead installation. This file will be placed in the Homestead directory:

```shell
[Laravel 13] Explain horizon: Laravel Horizon

- Introduction
- Installation
    - Configuration
    - Dashboard Authorization
    - Max Job Attempts
    - Job Timeout
    - Job Backoff
    - Silenced Jobs
- Balancing Strategies
    - Auto Balancing
    - Simple Balancing
    - No Balancing
- Upgrading Horizon
- Running Horizon
    - Deploying Horizon
- Tags
- Notifications
- Metrics
- Deleting Failed Jobs
- Clearing Jobs From Queues

<a name="introduction"></a>
[Laravel 13] Explain horizon: Introduction

> [!NOTE]
> Before digging into Laravel Horizon, you should familiarize yourself with Laravel's base queue services. Horizon augments Laravel's queue with additional features that may be confusing if you are not already familiar with the basic queue features offered by Laravel.

Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues. Horizon allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.

When using Horizon, all of your queue worker configuration is stored in a single, simple configuration file. By defining your application's worker configuration in a version controlled file, you may easily scale or modify your application's queue workers when deploying your application.

<img src="https://laravel.com/img/docs/horizon-example.png">

<a name="installation"></a>
[Laravel 13] Explain horizon: Installation

> [!WARNING]
> Laravel Horizon requires that you use Redis to power your queue. Therefore, you should ensure that your queue connection is set to redis in your application's config/queue.php configuration file. Horizon is not compatible with Redis Cluster at this time.

You may install Horizon into your project using the Composer package manager:

After installing Horizon, publish its assets using the horizon:install Artisan command:

<a name="configuration"></a>