Example #1
0
 public function __construct()
 {
     // get custom schema object
     $this->schema = \DB::connection()->getSchemaBuilder();
     // bind new blueprint class
     $this->schema->blueprintResolver(function ($table, $callback) {
         return new Blueprint($table, $callback);
     });
 }
 /**
  * Set the Schema Blueprint resolver callback.
  *
  * @param \Closure $resolver
  * @return void 
  * @static 
  */
 public static function blueprintResolver($resolver)
 {
     \Illuminate\Database\Schema\Builder::blueprintResolver($resolver);
 }
Example #3
0
 /**
  * Set the Schema Blueprint resolver callback.
  *
  * @param  \Closure $resolver
  *
  * @return void
  */
 public function blueprintResolver(Closure $resolver)
 {
     static::$schema->blueprintResolver($resolver);
 }