title | description | extends | section |
---|---|---|---|
Database |
Database |
_layouts.documentation |
content |
Using the app:install
Artisan command you can install the database
component:
php <your-app-name> app:install database
As you might have already guessed, it is Laravel's Eloquent component that works like a breeze in the Laravel Zero environment too.
Usage:
use DB;
DB::table('users')->insert(
['email' => '[email protected]']
);
$users = DB::table('users')->get();
Laravel Database Migrations, database factories, and Database Seeding features are also included.
The database
directory isn't included in Laravel Zero standalone PHAR builds by default.
If you are using the Database components migration, factory, or seeder functionality make sure to add the directory to your Box configurations directories
section.