messages listlengths 2 2 | version stringclasses 4
values | topic stringclasses 102
values |
|---|---|---|
[
{
"role": "user",
"content": "How do I register middleware in this Laravel app?\n\nContext:\ncomposer.json: \"laravel/framework\": \"^11.0\"\nbootstrap/app.php uses Application::configure()"
},
{
"role": "assistant",
"content": "Detected Laravel 11.x from composer.json (^11.0) and the Laravel 11... | 11.x | version detection middleware |
[
{
"role": "user",
"content": "How do I set up API token authentication?\n\nContext:\ncomposer.json: \"laravel/framework\": \"^10.48\""
},
{
"role": "assistant",
"content": "Detected Laravel 10.x from composer.json (^10.48).\n\nFor Laravel 10, use Laravel Sanctum:\n1. `composer require laravel/sa... | 10.x | version detection sanctum |
[
{
"role": "user",
"content": "[Laravel 10] Explain artisan: Artisan Console"
},
{
"role": "assistant",
"content": "- Introduction\n - Tinker (REPL)\n- Writing Commands\n - Generating Commands\n - Command Structure\n - Closure Commands\n - Isolatable Commands\n- Defining Input Expe... | 10.x | artisan |
[
{
"role": "user",
"content": "[Laravel 10] Explain artisan: Introduction"
},
{
"role": "assistant",
"content": "Artisan is the command line interface included with Laravel. Artisan exists at the root of your application as the artisan script and provides a number of helpful commands that can ass... | 10.x | artisan |
[
{
"role": "user",
"content": "[Laravel 10] Explain artisan: Laravel Sail"
},
{
"role": "assistant",
"content": "If you are using Laravel Sail as your local development environment, remember to use the sail command line to invoke Artisan commands. Sail will execute your Artisan commands within yo... | 10.x | artisan |
[
{
"role": "user",
"content": "[Laravel 10] Explain artisan: Tinker (REPL)"
},
{
"role": "assistant",
"content": "Laravel Tinker is a powerful REPL for the Laravel framework, powered by the PsySH package.\n\n<a name=\"installation\"></a>"
}
] | 10.x | artisan |
[
{
"role": "user",
"content": "[Laravel 10] Explain artisan: Installation"
},
{
"role": "assistant",
"content": "All Laravel applications include Tinker by default. However, you may install Tinker using Composer if you have previously removed it from your application:\n\n> [!NOTE] \n> Looking fo... | 10.x | artisan |
[
{
"role": "user",
"content": "[Laravel 10] Explain authentication: Authentication"
},
{
"role": "assistant",
"content": "- Introduction\n - Starter Kits\n - Database Considerations\n - Ecosystem Overview\n- Authentication Quickstart\n - Install a Starter Kit\n - Retrieving the Aut... | 10.x | authentication |
[
{
"role": "user",
"content": "[Laravel 10] Explain authentication: Introduction"
},
{
"role": "assistant",
"content": "Many web applications provide a way for their users to authenticate with the application and \"login\". Implementing this feature in web applications can be a complex and potent... | 10.x | authentication |
[
{
"role": "user",
"content": "[Laravel 10] Explain authentication: Starter Kits"
},
{
"role": "assistant",
"content": "Want to get started fast? Install a Laravel application starter kit in a fresh Laravel application. After migrating your database, navigate your browser to /register or any othe... | 10.x | authentication |
[
{
"role": "user",
"content": "[Laravel 10] Explain authentication: Database Considerations"
},
{
"role": "assistant",
"content": "By default, Laravel includes an App\\Models\\User Eloquent model in your app/Models directory. This model may be used with the default Eloquent authentication driver.... | 10.x | authentication |
[
{
"role": "user",
"content": "[Laravel 10] Explain authentication: Ecosystem Overview"
},
{
"role": "assistant",
"content": "Laravel offers several packages related to authentication. Before continuing, we'll review the general authentication ecosystem in Laravel and discuss each package's inten... | 10.x | authentication |
[
{
"role": "user",
"content": "[Laravel 10] Explain authorization: Authorization"
},
{
"role": "assistant",
"content": "- Introduction\n- Gates\n - Writing Gates\n - Authorizing Actions\n - Gate Responses\n - Intercepting Gate Checks\n - Inline Authorization\n- Creating Policies\n ... | 10.x | authorization |
[
{
"role": "user",
"content": "[Laravel 10] Explain authorization: Introduction"
},
{
"role": "assistant",
"content": "In addition to providing built-in authentication services, Laravel also provides a simple way to authorize user actions against a given resource. For example, even though a user ... | 10.x | authorization |
[
{
"role": "user",
"content": "[Laravel 10] Explain authorization: Writing Gates"
},
{
"role": "assistant",
"content": "> [!WARNING] \n> Gates are a great way to learn the basics of Laravel's authorization features; however, when building robust Laravel applications you should consider using pol... | 10.x | authorization |
[
{
"role": "user",
"content": "[Laravel 10] Explain authorization: Authorizing Actions"
},
{
"role": "assistant",
"content": "To authorize an action using gates, you should use the allows or denies methods provided by the Gate facade. Note that you are not required to pass the currently authentic... | 10.x | authorization |
[
{
"role": "user",
"content": "[Laravel 10] Explain authorization: Authorizing or Throwing Exceptions"
},
{
"role": "assistant",
"content": "If you would like to attempt to authorize an action and automatically throw an Illuminate\\Auth\\Access\\AuthorizationException if the user is not allowed t... | 10.x | authorization |
[
{
"role": "user",
"content": "[Laravel 10] Explain billing: Laravel Cashier (Stripe)"
},
{
"role": "assistant",
"content": "- Introduction\n- Upgrading Cashier\n- Installation\n- Configuration\n - Billable Model\n - API Keys\n - Currency Configuration\n - Tax Configuration\n - Log... | 10.x | billing |
[
{
"role": "user",
"content": "[Laravel 10] Explain billing: Introduction"
},
{
"role": "assistant",
"content": "Laravel Cashier Stripe provides an expressive, fluent interface to Stripe's subscription billing services. It handles almost all of the boilerplate subscription billing code you are dr... | 10.x | billing |
[
{
"role": "user",
"content": "[Laravel 10] Explain billing: Upgrading Cashier"
},
{
"role": "assistant",
"content": "When upgrading to a new version of Cashier, it's important that you carefully review the upgrade guide.\n\n> [!WARNING] \n> To prevent breaking changes, Cashier uses a fixed Stri... | 10.x | billing |
[
{
"role": "user",
"content": "[Laravel 10] Explain billing: Installation"
},
{
"role": "assistant",
"content": "First, install the Cashier package for Stripe using the Composer package manager:\n\nAfter installing the package, publish Cashier's migrations using the vendor:publish Artisan command... | 10.x | billing |
[
{
"role": "user",
"content": "[Laravel 10] Explain billing: Billable Model"
},
{
"role": "assistant",
"content": "Before using Cashier, add the Billable trait to your billable model definition. Typically, this will be the App\\Models\\User model. This trait provides various methods to allow you ... | 10.x | billing |
[
{
"role": "user",
"content": "[Laravel 10] Explain blade: Blade Templates"
},
{
"role": "assistant",
"content": "- Introduction\n - Supercharging Blade With Livewire\n- Displaying Data\n - HTML Entity Encoding\n - Blade and JavaScript Frameworks\n- Blade Directives\n - If Statements\... | 10.x | blade |
[
{
"role": "user",
"content": "[Laravel 10] Explain blade: Introduction"
},
{
"role": "assistant",
"content": "Blade is the simple, yet powerful templating engine that is included with Laravel. Unlike some PHP templating engines, Blade does not restrict you from using plain PHP code in your templ... | 10.x | blade |
[
{
"role": "user",
"content": "[Laravel 10] Explain blade: Supercharging Blade With Livewire"
},
{
"role": "assistant",
"content": "Want to take your Blade templates to the next level and build dynamic interfaces with ease? Check out Laravel Livewire. Livewire allows you to write Blade components... | 10.x | blade |
[
{
"role": "user",
"content": "[Laravel 10] Explain blade: Displaying Data"
},
{
"role": "assistant",
"content": "You may display data that is passed to your Blade views by wrapping the variable in curly braces. For example, given the following route:\n\n Route::get('/', function () {\n ... | 10.x | blade |
[
{
"role": "user",
"content": "[Laravel 10] Explain blade: HTML Entity Encoding"
},
{
"role": "assistant",
"content": "By default, Blade (and the Laravel e function) will double encode HTML entities. If you would like to disable double encoding, call the Blade::withoutDoubleEncoding method from t... | 10.x | blade |
[
{
"role": "user",
"content": "[Laravel 10] Explain broadcasting: Broadcasting"
},
{
"role": "assistant",
"content": "- Introduction\n- Server Side Installation\n - Configuration\n - Reverb\n - Pusher Channels\n - Ably\n - Open Source Alternatives\n- Client Side Installation\n -... | 10.x | broadcasting |
[
{
"role": "user",
"content": "[Laravel 10] Explain broadcasting: Introduction"
},
{
"role": "assistant",
"content": "In many modern web applications, WebSockets are used to implement realtime, live-updating user interfaces. When some data is updated on the server, a message is typically sent ove... | 10.x | broadcasting |
[
{
"role": "user",
"content": "[Laravel 10] Explain broadcasting: Supported Drivers"
},
{
"role": "assistant",
"content": "By default, Laravel includes three server-side broadcasting drivers for you to choose from: Laravel Reverb, Pusher Channels, and Ably.\n\n> [!NOTE] \n> Before diving into ev... | 10.x | broadcasting |
[
{
"role": "user",
"content": "[Laravel 10] Explain broadcasting: Server Side Installation"
},
{
"role": "assistant",
"content": "To get started using Laravel's event broadcasting, we need to do some configuration within the Laravel application as well as install a few packages.\n\nEvent broadcas... | 10.x | broadcasting |
[
{
"role": "user",
"content": "[Laravel 10] Explain broadcasting: Configuration"
},
{
"role": "assistant",
"content": "All of your application's event broadcasting configuration is stored in the config/broadcasting.php configuration file. Laravel supports several broadcast drivers out of the box:... | 10.x | broadcasting |
[
{
"role": "user",
"content": "[Laravel 10] Explain cache: Cache"
},
{
"role": "assistant",
"content": "- Introduction\n- Configuration\n - Driver Prerequisites\n- Cache Usage\n - Obtaining a Cache Instance\n - Retrieving Items From the Cache\n - Storing Items in the Cache\n - Remo... | 10.x | cache |
[
{
"role": "user",
"content": "[Laravel 10] Explain cache: Introduction"
},
{
"role": "assistant",
"content": "Some of the data retrieval or processing tasks performed by your application could be CPU intensive or take several seconds to complete. When this is the case, it is common to cache the ... | 10.x | cache |
[
{
"role": "user",
"content": "[Laravel 10] Explain cache: Configuration"
},
{
"role": "assistant",
"content": "Your application's cache configuration file is located at config/cache.php. In this file, you may specify which cache driver you would like to be used by default throughout your applica... | 10.x | cache |
[
{
"role": "user",
"content": "[Laravel 10] Explain cache: Database"
},
{
"role": "assistant",
"content": "When using the database cache driver, you will need to set up a table to contain the cache items. You'll find an example Schema declaration for the table below:\n\n Schema::create('cache'... | 10.x | cache |
[
{
"role": "user",
"content": "[Laravel 10] Explain cache: Memcached"
},
{
"role": "assistant",
"content": "Using the Memcached driver requires the Memcached PECL package to be installed. You may list all of your Memcached servers in the config/cache.php configuration file. This file already cont... | 10.x | cache |
[
{
"role": "user",
"content": "[Laravel 10] Explain cashier paddle: Laravel Cashier (Paddle)"
},
{
"role": "assistant",
"content": "- Introduction\n- Upgrading Cashier\n- Installation\n - Paddle Sandbox\n- Configuration\n - Billable Model\n - API Keys\n - Paddle JS\n - Currency Con... | 10.x | cashier paddle |
[
{
"role": "user",
"content": "[Laravel 10] Explain cashier paddle: Introduction"
},
{
"role": "assistant",
"content": "> [!WARNING] \n> This documentation is for Cashier Paddle 2.x's integration with Paddle Billing. If you're still using Paddle Classic, you should use Cashier Paddle 1.x.\n\nLar... | 10.x | cashier paddle |
[
{
"role": "user",
"content": "[Laravel 10] Explain cashier paddle: Upgrading Cashier"
},
{
"role": "assistant",
"content": "When upgrading to a new version of Cashier, it's important that you carefully review the upgrade guide.\n\n<a name=\"installation\"></a>"
}
] | 10.x | cashier paddle |
[
{
"role": "user",
"content": "[Laravel 10] Explain cashier paddle: Installation"
},
{
"role": "assistant",
"content": "First, install the Cashier package for Paddle using the Composer package manager:\n\nNext, you should publish the Cashier migration files using the vendor:publish Artisan comman... | 10.x | cashier paddle |
[
{
"role": "user",
"content": "[Laravel 10] Explain cashier paddle: Paddle Sandbox"
},
{
"role": "assistant",
"content": "During local and staging development, you should register a Paddle Sandbox account. This account will give you a sandboxed environment to test and develop your applications wi... | 10.x | cashier paddle |
[
{
"role": "user",
"content": "[Laravel 10] Explain collections: Collections"
},
{
"role": "assistant",
"content": "- Introduction\n - Creating Collections\n - Extending Collections\n- Available Methods\n- Higher Order Messages\n- Lazy Collections\n - Introduction\n - Creating Lazy Co... | 10.x | collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain collections: Introduction"
},
{
"role": "assistant",
"content": "The Illuminate\\Support\\Collection class provides a fluent, convenient wrapper for working with arrays of data. For example, check out the following code. We'll use the collect he... | 10.x | collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain collections: Creating Collections"
},
{
"role": "assistant",
"content": "As mentioned above, the collect helper returns a new Illuminate\\Support\\Collection instance for the given array. So, creating a collection is as simple as:\n\n $collec... | 10.x | collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain collections: Extending Collections"
},
{
"role": "assistant",
"content": "Collections are \"macroable\", which allows you to add additional methods to the Collection class at run time. The Illuminate\\Support\\Collection class' macro method acce... | 10.x | collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain collections: Macro Arguments"
},
{
"role": "assistant",
"content": "If necessary, you may define macros that accept additional arguments:\n\n use Illuminate\\Support\\Collection;\n use Illuminate\\Support\\Facades\\Lang;\n\n Collection:... | 10.x | collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain configuration: Configuration"
},
{
"role": "assistant",
"content": "- Introduction\n- Environment Configuration\n - Environment Variable Types\n - Retrieving Environment Configuration\n - Determining the Current Environment\n - Encry... | 10.x | configuration |
[
{
"role": "user",
"content": "[Laravel 10] Explain configuration: Introduction"
},
{
"role": "assistant",
"content": "All of the configuration files for the Laravel framework are stored in the config directory. Each option is documented, so feel free to look through the files and get familiar wi... | 10.x | configuration |
[
{
"role": "user",
"content": "[Laravel 10] Explain configuration: Application Overview"
},
{
"role": "assistant",
"content": "In a hurry? You can get a quick overview of your application's configuration, drivers, and environment via the about Artisan command:\n\nIf you're only interested in a pa... | 10.x | configuration |
[
{
"role": "user",
"content": "[Laravel 10] Explain configuration: Environment Configuration"
},
{
"role": "assistant",
"content": "It is often helpful to have different configuration values based on the environment where the application is running. For example, you may wish to use a different ca... | 10.x | configuration |
[
{
"role": "user",
"content": "[Laravel 10] Explain configuration: Environment File Security"
},
{
"role": "assistant",
"content": "Your .env file should not be committed to your application's source control, since each developer / server using your application could require a different environme... | 10.x | configuration |
[
{
"role": "user",
"content": "[Laravel 10] Explain console tests: Console Tests"
},
{
"role": "assistant",
"content": "- Introduction\n- Success / Failure Expectations\n- Input / Output Expectations\n- Console Events\n\n<a name=\"introduction\"></a>"
}
] | 10.x | console tests |
[
{
"role": "user",
"content": "[Laravel 10] Explain console tests: Introduction"
},
{
"role": "assistant",
"content": "In addition to simplifying HTTP testing, Laravel provides a simple API for testing your application's custom console commands.\n\n<a name=\"success-failure-expectations\"></a>"
... | 10.x | console tests |
[
{
"role": "user",
"content": "[Laravel 10] Explain console tests: Success / Failure Expectations"
},
{
"role": "assistant",
"content": "To get started, let's explore how to make assertions regarding an Artisan command's exit code. To accomplish this, we will use the artisan method to invoke an A... | 10.x | console tests |
[
{
"role": "user",
"content": "[Laravel 10] Explain console tests: Input / Output Expectations"
},
{
"role": "assistant",
"content": "Laravel allows you to easily \"mock\" user input for your console commands using the expectsQuestion method. In addition, you may specify the exit code and text th... | 10.x | console tests |
[
{
"role": "user",
"content": "[Laravel 10] Explain console tests: Confirmation Expectations"
},
{
"role": "assistant",
"content": "When writing a command which expects confirmation in the form of a \"yes\" or \"no\" answer, you may utilize the expectsConfirmation method:\n\n $this->artisan('m... | 10.x | console tests |
[
{
"role": "user",
"content": "[Laravel 10] Explain container: Service Container"
},
{
"role": "assistant",
"content": "- Introduction\n - Zero Configuration Resolution\n - When to Utilize the Container\n- Binding\n - Binding Basics\n - Binding Interfaces to Implementations\n - Con... | 10.x | container |
[
{
"role": "user",
"content": "[Laravel 10] Explain container: Introduction"
},
{
"role": "assistant",
"content": "The Laravel service container is a powerful tool for managing class dependencies and performing dependency injection. Dependency injection is a fancy phrase that essentially means th... | 10.x | container |
[
{
"role": "user",
"content": "[Laravel 10] Explain container: Zero Configuration Resolution"
},
{
"role": "assistant",
"content": "If a class has no dependencies or only depends on other concrete classes (not interfaces), the container does not need to be instructed on how to resolve that class.... | 10.x | container |
[
{
"role": "user",
"content": "[Laravel 10] Explain container: When to Utilize the Container"
},
{
"role": "assistant",
"content": "Thanks to zero configuration resolution, you will often type-hint dependencies on routes, controllers, event listeners, and elsewhere without ever manually interacti... | 10.x | container |
[
{
"role": "user",
"content": "[Laravel 10] Explain container: Simple Bindings"
},
{
"role": "assistant",
"content": "Almost all of your service container bindings will be registered within service providers, so most of these examples will demonstrate using the container in that context.\n\nWithi... | 10.x | container |
[
{
"role": "user",
"content": "[Laravel 10] Explain contracts: Contracts"
},
{
"role": "assistant",
"content": "- Introduction\n - Contracts vs. Facades\n- When to Use Contracts\n- How to Use Contracts\n- Contract Reference\n\n<a name=\"introduction\"></a>"
}
] | 10.x | contracts |
[
{
"role": "user",
"content": "[Laravel 10] Explain contracts: Introduction"
},
{
"role": "assistant",
"content": "Laravel's \"contracts\" are a set of interfaces that define the core services provided by the framework. For example, an Illuminate\\Contracts\\Queue\\Queue contract defines the meth... | 10.x | contracts |
[
{
"role": "user",
"content": "[Laravel 10] Explain contracts: Contracts vs. Facades"
},
{
"role": "assistant",
"content": "Laravel's facades and helper functions provide a simple way of utilizing Laravel's services without needing to type-hint and resolve contracts out of the service container. ... | 10.x | contracts |
[
{
"role": "user",
"content": "[Laravel 10] Explain contracts: When to Use Contracts"
},
{
"role": "assistant",
"content": "The decision to use contracts or facades will come down to personal taste and the tastes of your development team. Both contracts and facades can be used to create robust, w... | 10.x | contracts |
[
{
"role": "user",
"content": "[Laravel 10] Explain contracts: How to Use Contracts"
},
{
"role": "assistant",
"content": "So, how do you get an implementation of a contract? It's actually quite simple.\n\nMany types of classes in Laravel are resolved through the service container, including cont... | 10.x | contracts |
[
{
"role": "user",
"content": "[Laravel 10] Explain controllers: Controllers"
},
{
"role": "assistant",
"content": "- Introduction\n- Writing Controllers\n - Basic Controllers\n - Single Action Controllers\n- Controller Middleware\n- Resource Controllers\n - Partial Resource Routes\n ... | 10.x | controllers |
[
{
"role": "user",
"content": "[Laravel 10] Explain controllers: Introduction"
},
{
"role": "assistant",
"content": "Instead of defining all of your request handling logic as closures in your route files, you may wish to organize this behavior using \"controller\" classes. Controllers can group r... | 10.x | controllers |
[
{
"role": "user",
"content": "[Laravel 10] Explain controllers: Basic Controllers"
},
{
"role": "assistant",
"content": "To quickly generate a new controller, you may run the make:controller Artisan command. By default, all of the controllers for your application are stored in the app/Http/Contr... | 10.x | controllers |
[
{
"role": "user",
"content": "[Laravel 10] Explain controllers: Single Action Controllers"
},
{
"role": "assistant",
"content": "If a controller action is particularly complex, you might find it convenient to dedicate an entire controller class to that single action. To accomplish this, you may ... | 10.x | controllers |
[
{
"role": "user",
"content": "[Laravel 10] Explain controllers: Controller Middleware"
},
{
"role": "assistant",
"content": "Middleware may be assigned to the controller's routes in your route files:\n\n Route::get('profile', [UserController::class, 'show'])->middleware('auth');\n\nOr, you ma... | 10.x | controllers |
[
{
"role": "user",
"content": "[Laravel 10] Explain csrf: CSRF Protection"
},
{
"role": "assistant",
"content": "- Introduction\n- Preventing CSRF Requests\n - Excluding URIs\n- X-CSRF-Token\n- X-XSRF-Token\n\n<a name=\"csrf-introduction\"></a>"
}
] | 10.x | csrf |
[
{
"role": "user",
"content": "[Laravel 10] Explain csrf: Introduction"
},
{
"role": "assistant",
"content": "Cross-site request forgeries are a type of malicious exploit whereby unauthorized commands are performed on behalf of an authenticated user. Thankfully, Laravel makes it easy to protect y... | 10.x | csrf |
[
{
"role": "user",
"content": "[Laravel 10] Explain csrf: An Explanation of the Vulnerability"
},
{
"role": "assistant",
"content": "In case you're not familiar with cross-site request forgeries, let's discuss an example of how this vulnerability can be exploited. Imagine your application has a /... | 10.x | csrf |
[
{
"role": "user",
"content": "[Laravel 10] Explain csrf: Preventing CSRF Requests"
},
{
"role": "assistant",
"content": "Laravel automatically generates a CSRF \"token\" for each active user session managed by the application. This token is used to verify that the authenticated user is the perso... | 10.x | csrf |
[
{
"role": "user",
"content": "[Laravel 10] Explain csrf: CSRF Tokens & SPAs"
},
{
"role": "assistant",
"content": "If you are building a SPA that is utilizing Laravel as an API backend, you should consult the Laravel Sanctum documentation for information on authenticating with your API and prote... | 10.x | csrf |
[
{
"role": "user",
"content": "[Laravel 10] Explain database testing: Database Testing"
},
{
"role": "assistant",
"content": "- Introduction\n - Resetting the Database After Each Test\n- Model Factories\n- Running Seeders\n- Available Assertions\n\n<a name=\"introduction\"></a>"
}
] | 10.x | database testing |
[
{
"role": "user",
"content": "[Laravel 10] Explain database testing: Introduction"
},
{
"role": "assistant",
"content": "Laravel provides a variety of helpful tools and assertions to make it easier to test your database driven applications. In addition, Laravel model factories and seeders make i... | 10.x | database testing |
[
{
"role": "user",
"content": "[Laravel 10] Explain database testing: Resetting the Database After Each Test"
},
{
"role": "assistant",
"content": "Before proceeding much further, let's discuss how to reset your database after each of your tests so that data from a previous test does not interfer... | 10.x | database testing |
[
{
"role": "user",
"content": "[Laravel 10] Explain database testing: Model Factories"
},
{
"role": "assistant",
"content": "When testing, you may need to insert a few records into your database before executing your test. Instead of manually specifying the value of each column when you create th... | 10.x | database testing |
[
{
"role": "user",
"content": "[Laravel 10] Explain database testing: Running Seeders"
},
{
"role": "assistant",
"content": "If you would like to use database seeders to populate your database during a feature test, you may invoke the seed method. By default, the seed method will execute the Data... | 10.x | database testing |
[
{
"role": "user",
"content": "[Laravel 10] Explain database: Database: Getting Started"
},
{
"role": "assistant",
"content": "- Introduction\n - Configuration\n - Read and Write Connections\n- Running SQL Queries\n - Using Multiple Database Connections\n - Listening for Query Events\... | 10.x | database |
[
{
"role": "user",
"content": "[Laravel 10] Explain database: Introduction"
},
{
"role": "assistant",
"content": "Almost every modern web application interacts with a database. Laravel makes interacting with databases extremely simple across a variety of supported databases using raw SQL, a fluen... | 10.x | database |
[
{
"role": "user",
"content": "[Laravel 10] Explain database: Configuration"
},
{
"role": "assistant",
"content": "The configuration for Laravel's database services is located in your application's config/database.php configuration file. In this file, you may define all of your database connectio... | 10.x | database |
[
{
"role": "user",
"content": "[Laravel 10] Explain database: SQLite Configuration"
},
{
"role": "assistant",
"content": "SQLite databases are contained within a single file on your filesystem. You can create a new SQLite database using the touch command in your terminal: touch database/database.... | 10.x | database |
[
{
"role": "user",
"content": "[Laravel 10] Explain database: Microsoft SQL Server Configuration"
},
{
"role": "assistant",
"content": "To use a Microsoft SQL Server database, you should ensure that you have the sqlsrv and pdo_sqlsrv PHP extensions installed as well as any dependencies they may r... | 10.x | database |
[
{
"role": "user",
"content": "[Laravel 10] Explain deployment: Deployment"
},
{
"role": "assistant",
"content": "- Introduction\n- Server Requirements\n- Server Configuration\n - Nginx\n- Optimization\n - Autoloader Optimization\n - Caching Configuration\n - Caching Events\n - Cac... | 10.x | deployment |
[
{
"role": "user",
"content": "[Laravel 10] Explain deployment: Introduction"
},
{
"role": "assistant",
"content": "When you're ready to deploy your Laravel application to production, there are some important things you can do to make sure your application is running as efficiently as possible. I... | 10.x | deployment |
[
{
"role": "user",
"content": "[Laravel 10] Explain deployment: Server Requirements"
},
{
"role": "assistant",
"content": "The Laravel framework has a few system requirements. You should ensure that your web server has the following minimum PHP version and extensions:\n\n<div class=\"content-list... | 10.x | deployment |
[
{
"role": "user",
"content": "[Laravel 10] Explain deployment: Nginx"
},
{
"role": "assistant",
"content": "If you are deploying your application to a server that is running Nginx, you may use the following configuration file as a starting point for configuring your web server. Most likely, this... | 10.x | deployment |
[
{
"role": "user",
"content": "[Laravel 10] Explain deployment: Autoloader Optimization"
},
{
"role": "assistant",
"content": "When deploying to production, make sure that you are optimizing Composer's class autoloader map so Composer can quickly find the proper file to load for a given class:\n\... | 10.x | deployment |
[
{
"role": "user",
"content": "[Laravel 10] Explain dusk: Laravel Dusk"
},
{
"role": "assistant",
"content": "- Introduction\n- Installation\n - Managing ChromeDriver Installations\n - Using Other Browsers\n- Getting Started\n - Generating Tests\n - Resetting the Database After Each T... | 10.x | dusk |
[
{
"role": "user",
"content": "[Laravel 10] Explain dusk: Introduction"
},
{
"role": "assistant",
"content": "Laravel Dusk provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you to install JDK or Selenium on your local computer. Instead, Dusk... | 10.x | dusk |
[
{
"role": "user",
"content": "[Laravel 10] Explain dusk: Installation"
},
{
"role": "assistant",
"content": "To get started, you should install Google Chrome and add the laravel/dusk Composer dependency to your project:\n\n> [!WARNING] \n> If you are manually registering Dusk's service provider... | 10.x | dusk |
[
{
"role": "user",
"content": "[Laravel 10] Explain dusk: Managing ChromeDriver Installations"
},
{
"role": "assistant",
"content": "If you would like to install a different version of ChromeDriver than what is installed by Laravel Dusk via the dusk:install command, you may use the dusk:chrome-dr... | 10.x | dusk |
[
{
"role": "user",
"content": "[Laravel 10] Explain dusk: Install the version of ChromeDriver that matches the detected version of Chrome / Chromium for your OS..."
},
{
"role": "assistant",
"content": "php artisan dusk:chrome-driver --detect\n``\n\n> [!WARNING] \n> Dusk requires the chromedrive... | 10.x | dusk |
[
{
"role": "user",
"content": "[Laravel 10] Explain eloquent collections: Eloquent: Collections"
},
{
"role": "assistant",
"content": "- Introduction\n- Available Methods\n- Custom Collections\n\n<a name=\"introduction\"></a>"
}
] | 10.x | eloquent collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain eloquent collections: Introduction"
},
{
"role": "assistant",
"content": "All Eloquent methods that return more than one model result will return instances of the Illuminate\\Database\\Eloquent\\Collection class, including results retrieved via ... | 10.x | eloquent collections |
[
{
"role": "user",
"content": "[Laravel 10] Explain eloquent collections: Eloquent Collection Conversion"
},
{
"role": "assistant",
"content": "While most Eloquent collection methods return a new instance of an Eloquent collection, the collapse, flatten, flip, keys, pluck, and zip methods return ... | 10.x | eloquent collections |
End of preview. Expand in Data Studio
Laravel Coder LoRA — end-to-end training data
Instruction-tuning datasets for Laravel Bob (Qwen / CodeLlama / DeepSeek modelfiles).
Built from official Laravel docs v10.x–v13.x plus version-detection examples.
Each config has a single schema — do not mix raw (Alpaca) with chat / lora_* (messages).
Configs
| Config | Path | Rows | Schema |
|---|---|---|---|
raw |
raw/laravel_training.jsonl |
1253 | instruction, input, output, topic, version |
chat |
chat/laravel_training_chat.jsonl |
1253 | messages, topic, version |
lora_train |
lora/laravel_train.jsonl |
800 | messages, topic, version |
lora_eval |
lora/laravel_eval.jsonl |
40 | messages, topic, version |
Auxiliary files (not dataset configs)
| Path | Description |
|---|---|
few_shot_examples.json |
Modelfile few-shot (JSON array) |
laravel_knowledge.md |
RAG / system context digest |
meta.json |
Corpus stats |
lora/meta.json |
Curated split stats |
Schema — raw
{
"instruction": "[Laravel 11] Explain routing: Basic Routing",
"input": "",
"output": "...",
"topic": "routing",
"version": "11.x"
}
Schema — chat, lora_train, lora_eval
{
"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
],
"version": "11.x",
"topic": "routing"
}
Load in Python
from datasets import load_dataset
raw = load_dataset("bhavin-gajjar/laravel-coder-lora-train", "raw", split="train")
chat = load_dataset("bhavin-gajjar/laravel-coder-lora-train", "chat", split="train")
train = load_dataset("bhavin-gajjar/laravel-coder-lora-train", "lora_train", split="train")
eval_ds = load_dataset("bhavin-gajjar/laravel-coder-lora-train", "lora_eval", split="train")
Regenerate locally
cd ollama
python3 shared/build_training_data.py
python3 finetune/prepare_dataset.py
python3 finetune/export_chat_dataset.py
bash finetune/upload_dataset_to_hub.sh
Source
Generated from laravel-docs/{10,11,12,13}.x via shared/build_training_data.py.
- Downloads last month
- 93