PHP Classes

Laravel Multiple Database: Connect to multiple databases in an application

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 55 All time: 10,592 This week: 455Up
Version License PHP version Categories
laravel-multiple-dat 1.0.0The PHP License5PHP 5, Databases, Libraries
Description 

Author

This package demonstrates how to connect to multiple databases in a Laravel application.

It provides code to show how to connect to multiple databases, creating migrations, and establishing relationships.

This package is part of a tutorial article that shows how to handle access to more than one database connection when using the Laravel framework.

Innovation Award
PHP Programming Innovation award nominee
June 2021
Number 6
Usually, PHP applications only need to access a single database to store and retrieve the information they need to use.

In some cases, it may be necessary to connect to more than one database to perform operations that require access to information that is not all in the same database.

This package provides code to demonstrates so developers can learn how to connect to multiple databases in the same Laravel application.

Manuel Lemos
Picture of Channaveer Hakari
  Performance   Level  
Name: Channaveer Hakari <contact>
Classes: 8 packages by
Country: India India
Age: 33
All time rank: 2434144 in India India
Week rank: 50 Up7 in India India Up
Innovation award
Innovation award
Nominee: 2x

Details

About This Project

Laravel 7.X Project

I have written whole article on this - <a href="https://stackcoder.in/posts/laravel-7x-multiple-database-connections-migrations-relationships-querying?referer=github.com">Laravel 7.x Multiple Database Connections, Migrations, Relationships & Querying</a>

  • Connecting Multiple Databases From Single Project
  • Create & Manage Migrations For Different Databases
  • Running & Rollback Migrations
  • Model Relationships Of Different Databases
  • Querying From Relationship Tables.

  Files folder image Files (68)  
File Role Description
Files folder imageapp (5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (14 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (4 files)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

  Files folder image Files (68)  /  app  
File Role Description
Files folder imageConsole (1 file)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 2 directories)
Files folder imageModels (2 files)
Files folder imageProviders (5 files)

  Files folder image Files (68)  /  app  /  Console  
File Role Description
  Plain text file Kernel.php Class Class source

  Files folder image Files (68)  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files (68)  /  app  /  Http  
File Role Description
Files folder imageControllers (1 file)
Files folder imageMiddleware (7 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files (68)  /  app  /  Http  /  Controllers  
File Role Description
  Plain text file Controller.php Class Class source

  Files folder image Files (68)  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file Authenticate.php Class Class source
  Plain text file CheckForMaintenanceMode.php Class Class source
  Plain text file EncryptCookies.php Class Class source
  Plain text file RedirectIfAuthenticated.php Class Class source
  Plain text file TrimStrings.php Class Class source
  Plain text file TrustProxies.php Class Class source
  Plain text file VerifyCsrfToken.php Class Class source

  Files folder image Files (68)  /  app  /  Models  
File Role Description
  Plain text file Post.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files (68)  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file BroadcastServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source
  Plain text file RouteServiceProvider.php Class Class source

  Files folder image Files (68)  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files (68)  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file auth.php Class Class source
  Accessible without login Plain text file broadcasting.php Aux. Auxiliary script
  Accessible without login Plain text file cache.php Aux. Auxiliary script
  Accessible without login Plain text file cors.php Aux. Auxiliary script
  Accessible without login Plain text file database.php Aux. Auxiliary script
  Accessible without login Plain text file filesystems.php Aux. Auxiliary script
  Accessible without login Plain text file hashing.php Aux. Auxiliary script
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Auxiliary script
  Accessible without login Plain text file queue.php Aux. Auxiliary script
  Accessible without login Plain text file services.php Aux. Auxiliary script
  Accessible without login Plain text file session.php Aux. Auxiliary script
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files (68)  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (2 directories)
Files folder imageseeds (1 file)

  Files folder image Files (68)  /  database  /  factories  
File Role Description
  Plain text file UserFactory.php Class Class source

  Files folder image Files (68)  /  database  /  migrations  
File Role Description
Files folder imageblog1 (1 file)
Files folder imageblog2 (1 file)

  Files folder image Files (68)  /  database  /  migrations  /  blog1  
File Role Description
  Plain text file 2020_05_03_102445_create_users_table.php Class Class source

  Files folder image Files (68)  /  database  /  migrations  /  blog2  
File Role Description
  Plain text file 2020_05_03_102504_create_posts_table.php Class Class source

  Files folder image Files (68)  /  database  /  seeds  
File Role Description
  Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files (68)  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file index.php Class Class source
  Accessible without login Plain text file robots.txt Doc. Documentation
  Accessible without login Plain text file web.config Data Auxiliary data

  Files folder image Files (68)  /  resources  
File Role Description
Files folder imagejs (2 files)
Files folder imagelang (1 directory)
Files folder imagesass (1 file)
Files folder imageviews (1 file)

  Files folder image Files (68)  /  resources  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files (68)  /  resources  /  lang  
File Role Description
Files folder imageen (4 files)

  Files folder image Files (68)  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file auth.php Aux. Auxiliary script
  Accessible without login Plain text file pagination.php Aux. Auxiliary script
  Accessible without login Plain text file passwords.php Aux. Auxiliary script
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files (68)  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file app.scss Data Auxiliary data

  Files folder image Files (68)  /  resources  /  views  
File Role Description
  Accessible without login Plain text file welcome.blade.php Aux. Auxiliary script

  Files folder image Files (68)  /  routes  
File Role Description
  Accessible without login Plain text file api.php Example Example script
  Accessible without login Plain text file channels.php Example Example script
  Accessible without login Plain text file console.php Example Example script
  Accessible without login Plain text file web.php Example Example script

  Files folder image Files (68)  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (1 file)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files (68)  /  tests  /  Feature  
File Role Description
  Plain text file ExampleTest.php Class Class source

  Files folder image Files (68)  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:55
This week:0
All time:10,592
This week:455Up