Esempio n. 1
0
 /**
  * Register any application services.
  *
  * @return void
  */
 public function register()
 {
     Auth::extend('simple', function ($app) {
         $model = config('auth.model');
         return new UserProvider(new $model());
     });
     $this->app['db']->extend('neo4j', function ($config) {
         $conn = new Connection($config);
         $conn->setSchemaGrammar(new CypherGrammar());
         $conn->setQueryGrammar(new AppCypherGrammar());
         return $conn;
     });
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['db']->extend('neo4j', function ($config) {
         $conn = new Connection($config);
         $conn->setSchemaGrammar(new CypherGrammar());
         return $conn;
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('NeoEloquent', 'Vinelab\\NeoEloquent\\Eloquent\\Model');
         $loader->alias('Neo4jSchema', 'Vinelab\\NeoEloquent\\Facade\\Neo4jSchema');
     });
     $this->registerComponents();
 }
Esempio n. 3
0
 /**
  * Set the schema grammar used by the connection.
  *
  * @param \Illuminate\Database\Schema\Grammars\Grammar
  * @return void 
  * @static 
  */
 public static function setSchemaGrammar($grammar)
 {
     \Vinelab\NeoEloquent\Connection::setSchemaGrammar($grammar);
 }
Esempio n. 4
0
 /**
  * Set the schema grammar used by the connection.
  *
  * @param \Illuminate\Database\Schema\Grammars\Grammar
  * @return void 
  * @static 
  */
 public static function setSchemaGrammar($grammar)
 {
     //Method inherited from \Illuminate\Database\Connection
     \Vinelab\NeoEloquent\Connection::setSchemaGrammar($grammar);
 }