Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel 8 app with more than one database

$blogs = DB::connection('mysql2')->table("blog")->get();print_r($blogs);
Comment

laravel 8 app with more than one database

DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=mydatabaseDB_USERNAME=rootDB_PASSWORD=root   DB_CONNECTION_SECOND=mysqlDB_HOST_SECOND=127.0.0.1DB_PORT_SECOND=3306DB_DATABASE_SECOND=mydatabase2DB_USERNAME_SECOND=rootDB_PASSWORD_SECOND=root
Comment

laravel 8 app with more than one database

<?php   namespace App;  use IlluminateDatabaseEloquentModel;   class Blog extends Model{}
Comment

laravel 8 app with more than one database

<?php   namespace App;  use IlluminateDatabaseEloquentModel;   class Blog extends Model{    protected $connection = 'mysql2';}
Comment

laravel 8 app with more than one database

$blogs = DB::table("blog")->get();print_r($blogs);
Comment

PREVIOUS NEXT
Code Example
Php :: get user id trougt user code 
Php :: php bcdiv 
Php :: how to use “find_in_set” in cakephp 3 find method 
Php :: Max() Value And Min() Value 
Php :: ajouter une panier php 
Php :: How to on auto_recording using zoom api in php 
Php :: composer require laravelcollection 
Php :: eager loading set limit to relationship 
Php :: conect_from_db_datalayer 
Php :: Laravel/Php Carmel Casing / Title Casing 
Php :: laravel gigapay resend invite to employee 
Php :: Yii2 Dynamic Relational, Eager loading 
Php :: upload video file using ajax php 
Php :: login page php mysql check if user is verified in the database before user can be logged in 
Php :: magento2 join table with prefix 
Php :: Laravel 8 Factory - One To Many (Polymorphic) Relationship 
Php :: WebSocket connection to ‘wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data’ failed: Error during WebSocket handshake: Unexpected response code: 403 
Php :: exclude row from clooection laravel 
Php :: php order array by specific key 
Php :: how to create a modal in php 
Php :: php boolean 
Php :: run php with xampp 
Php :: image::make en php 
Php :: php include file from file included before 
Php :: Warning: Undefined array key "playerthrows" in C:xampphtdocsmini_projetindex.php on line 10 
Java :: how to change font size in JLabel 
Java :: spring boot maven run with profile 
Java :: string to date android 
Java :: java jcombobox get selected item 
Java :: base64.decode android 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =