PHP Classes

File: src/Models/Model.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Chatto PHP Websocket Chat System   src/Models/Model.php   Download  
File: src/Models/Model.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chatto PHP Websocket Chat System
Websocket based chat system using Ratchet library
Author: By
Last change:
Date: 3 years ago
Size: 754 bytes
 

Contents

Class file image Download
<?php
use Illuminate\Database\Capsule\Manager as Capsule;

$capsule = new Capsule;

$capsule->addConnection([
   
'driver' => 'mysql',
   
'host' => 'localhost',
   
'database' => 'chatto',
   
'username' => 'root',
   
'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();