Yuga Framework
  • Yuga Framework
  • Routing
  • Middleware
  • Controllers
  • ViewModels
  • Database
    • Elegant
      • Relationships
      • Complex queries
      • Events
    • Query
    • Migrations
  • Events
    • Event Classes
    • Event Handlers
  • Service Providers
  • Views
    • MVC
      • Hax Templates
    • MVVM
  • Helpers
  • Schedulers
  • Queue worker
  • Commands
    • Scaffold
Powered by GitBook
On this page
  • Introduction
  • Configuration

Was this helpful?

Database

Database interaction is key in any application and the way yuga makes it easy, is credibly wonderful

PreviousViewModelsNextElegant

Last updated 6 years ago

Was this helpful?

Introduction

Yuga makes interacting with databases extremely simple across a variety of database backends using either raw SQL, the , and the . Currently, Yuga supports three databases:

  • MySQL

  • PostgreSQL

  • SQLite

Configuration

The database configuration for your application is located at config/config.php. In this file you can define all of your database connections, as well as specify which connection should be used by default. Examples for most of the supported database systems are provided in this file.

By default, Yuga comes configured to use mysql but comes with the DATABASE_NAME key in the environment/.env blank so, it does not connect to any database but once the database name is provided, it will connect automatically.

fluent query builder
Elegant ORM