Unable to implement mongor bundle in laravel -


i trying implement mongor bundle laravel version 3.2.14

i have followed steps mentioned in documentation on mongor homepage

there no documentation regarding usage in homepage chance got following link : bundle full example

in-spite of following unable understand why code not working.

strangely not getting errors.

my code follows

database.php

'mongor' => array(         'hostname'   => '127.0.0.1',         'connect'    => true,         'timeout'    => '',         'replicaset' => '',         'db'         => 'census',         'username'   => 'root',         'password'   => '',         ), 

user.php(model)

class user extends mongor\model{      public static $timestamps = true;      public function __construct($connection = null)     {         parent::__construct($connection);         static::$collection = 'user';     }   } 

user.php(controller)

public function get_index()     {                    //return view::make('user.index');         $users = user::first();         dd($users);      } 

i getting following data when execute url:

object(user)#28 (14) {   ["connection"]=>   object(mongor\mongodb)#29 (4) {     ["_name":protected]=>     null     ["_connected":protected]=>     bool(true)     ["_connection":protected]=>     object(mongo)#30 (4) {       ["connected"]=>       bool(true)       ["status"]=>       null       ["server":protected]=>       string(19) "mongodb://localhost"       ["persistent":protected]=>       null     }     ["_db":protected]=>     object(mongodb)#31 (2) {       ["w"]=>       int(1)       ["wtimeout"]=>       int(10000)     }   }   ["exists"]=>   bool(false)   ["attributes"]=>   null   ["dirty"]=>   array(0) {   }   ["ignore"]=>   array(0) {   }   ["includes"]=>   array(0) {   }   ["relating"]=>   null   ["relating_key"]=>   null   ["relating_table"]=>   null   ["_limit"]=>   null   ["_skip"]=>   null   ["_where"]=>   array(0) {   }   ["_sort"]=>   array(0) {   }   ["_count":protected]=>   null } 

whereas when execute command db.user.find() in mongo shell relevant results.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -