which database supported in laravle

 Laravel, a popular PHP framework, supports multiple databases. The framework's database abstraction layer, called Eloquent ORM, provides a unified interface to interact with various database systems. Here are some of the databases supported by Laravel:

  1. MySQL: Laravel has extensive support for MySQL, one of the most widely used relational database management systems (RDBMS). It offers features like migrations, query builders, and Eloquent models for MySQL databases.

  2. PostgreSQL: Laravel also provides support for PostgreSQL, an advanced open-source RDBMS. You can use Laravel's migration and query builder features with PostgreSQL, as well as leverage the Eloquent ORM for database operations.

  3. SQLite: Laravel supports SQLite, a lightweight, file-based database engine. It's a good choice for development and testing environments due to its simplicity and ease of use.

  4. SQL Server: Laravel has built-in support for Microsoft SQL Server, a popular RDBMS. You can use Laravel's migration and query builder features with SQL Server, and Eloquent models can be used to interact with SQL Server databases.

  5. Oracle: Starting from Laravel version 5.8, Oracle Database is supported through a community-driven package called "yajra/laravel-oci8." This package allows you to work with Oracle databases using Laravel's features.

In addition to these databases, Laravel also provides a "connection" configuration option that allows you to configure other databases if necessary. This flexibility enables you to work with various database systems based on your project requirements.



Yes, Laravel supports MongoDB, a popular NoSQL database. Laravel provides a MongoDB database driver called "jenssegers/mongodb" that allows you to use MongoDB with the framework.

To use MongoDB with Laravel, you need to install the MongoDB package by running the following command:


composer require jenssegers/mongodb



After installing the package, you can configure your MongoDB connection in the config/database.php file. You will need to specify the MongoDB connection details such as the host, port, database name, and authentication credentials if required.

Once the configuration is set, you can use Laravel's Eloquent ORM to define models and interact with MongoDB collections. The "jenssegers/mongodb" package extends Laravel's Eloquent model, providing support for MongoDB-specific features and querying capabilities.

You can define a MongoDB model by extending the Jenssegers\Mongodb\Eloquent\Model class instead of the standard Illuminate\Database\Eloquent\Model. This allows you to utilize the MongoDB-specific functionality provided by the package.

Overall, Laravel's support for MongoDB allows you to seamlessly integrate MongoDB

No comments:

Post a Comment

Event listening in react

 How we can listen to som eevents some envents fire like click or automatically user enters into input button , that is event on word type i...