sekolah_adiwiyata/vendor/laravel/framework/src/Illuminate/Database
ilhamwara 37bb8325bf install laravel 10 2025-02-02 12:04:35 +07:00
..
Capsule install laravel 10 2025-02-02 12:04:35 +07:00
Concerns install laravel 10 2025-02-02 12:04:35 +07:00
Connectors install laravel 10 2025-02-02 12:04:35 +07:00
Console install laravel 10 2025-02-02 12:04:35 +07:00
DBAL install laravel 10 2025-02-02 12:04:35 +07:00
Eloquent install laravel 10 2025-02-02 12:04:35 +07:00
Events install laravel 10 2025-02-02 12:04:35 +07:00
Migrations install laravel 10 2025-02-02 12:04:35 +07:00
PDO install laravel 10 2025-02-02 12:04:35 +07:00
Query install laravel 10 2025-02-02 12:04:35 +07:00
Schema install laravel 10 2025-02-02 12:04:35 +07:00
ClassMorphViolationException.php install laravel 10 2025-02-02 12:04:35 +07:00
ConfigurationUrlParser.php install laravel 10 2025-02-02 12:04:35 +07:00
Connection.php install laravel 10 2025-02-02 12:04:35 +07:00
ConnectionInterface.php install laravel 10 2025-02-02 12:04:35 +07:00
ConnectionResolver.php install laravel 10 2025-02-02 12:04:35 +07:00
ConnectionResolverInterface.php install laravel 10 2025-02-02 12:04:35 +07:00
DatabaseManager.php install laravel 10 2025-02-02 12:04:35 +07:00
DatabaseServiceProvider.php install laravel 10 2025-02-02 12:04:35 +07:00
DatabaseTransactionRecord.php install laravel 10 2025-02-02 12:04:35 +07:00
DatabaseTransactionsManager.php install laravel 10 2025-02-02 12:04:35 +07:00
DeadlockException.php install laravel 10 2025-02-02 12:04:35 +07:00
DetectsConcurrencyErrors.php install laravel 10 2025-02-02 12:04:35 +07:00
DetectsLostConnections.php install laravel 10 2025-02-02 12:04:35 +07:00
Grammar.php install laravel 10 2025-02-02 12:04:35 +07:00
LICENSE.md install laravel 10 2025-02-02 12:04:35 +07:00
LazyLoadingViolationException.php install laravel 10 2025-02-02 12:04:35 +07:00
LostConnectionException.php install laravel 10 2025-02-02 12:04:35 +07:00
MigrationServiceProvider.php install laravel 10 2025-02-02 12:04:35 +07:00
MultipleColumnsSelectedException.php install laravel 10 2025-02-02 12:04:35 +07:00
MultipleRecordsFoundException.php install laravel 10 2025-02-02 12:04:35 +07:00
MySqlConnection.php install laravel 10 2025-02-02 12:04:35 +07:00
PostgresConnection.php install laravel 10 2025-02-02 12:04:35 +07:00
QueryException.php install laravel 10 2025-02-02 12:04:35 +07:00
README.md install laravel 10 2025-02-02 12:04:35 +07:00
RecordsNotFoundException.php install laravel 10 2025-02-02 12:04:35 +07:00
SQLiteConnection.php install laravel 10 2025-02-02 12:04:35 +07:00
SQLiteDatabaseDoesNotExistException.php install laravel 10 2025-02-02 12:04:35 +07:00
Seeder.php install laravel 10 2025-02-02 12:04:35 +07:00
SqlServerConnection.php install laravel 10 2025-02-02 12:04:35 +07:00
UniqueConstraintViolationException.php install laravel 10 2025-02-02 12:04:35 +07:00
composer.json install laravel 10 2025-02-02 12:04:35 +07:00

README.md

Illuminate Database

The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite. It also serves as the database layer of the Laravel PHP framework.

Usage Instructions

First, create a new "Capsule" manager instance. Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible.

use Illuminate\Database\Capsule\Manager as Capsule;

$capsule = new Capsule;

$capsule->addConnection([
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'database',
    'username' => 'root',
    'password' => 'password',
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix' => '',
]);

// Set the event dispatcher used by Eloquent models... (optional)
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
$capsule->setEventDispatcher(new Dispatcher(new Container));

// Make this Capsule instance available globally via static methods... (optional)
$capsule->setAsGlobal();

// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher())
$capsule->bootEloquent();

composer require "illuminate/events" required when you need to use observers with Eloquent.

Once the Capsule instance has been registered. You may use it like so:

Using The Query Builder

$users = Capsule::table('users')->where('votes', '>', 100)->get();

Other core methods may be accessed directly from the Capsule in the same manner as from the DB facade:

$results = Capsule::select('select * from users where id = ?', [1]);

Using The Schema Builder

Capsule::schema()->create('users', function ($table) {
    $table->increments('id');
    $table->string('email')->unique();
    $table->timestamps();
});

Using The Eloquent ORM

class User extends Illuminate\Database\Eloquent\Model {}

$users = User::where('votes', '>', 1)->get();

For further documentation on using the various database facilities this library provides, consult the Laravel framework documentation.