Skip to content

Commit

Permalink
🚑 fixed schema autoload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Oct 10, 2021
1 parent fc89df9 commit c9d6a1a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Schema.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

namespace Leaf\Schema;

use Illuminate\Database\Schema\Blueprint;
namespace Leaf;

class Schema
{
Expand All @@ -20,7 +18,7 @@ public static function build($capsule, $table, $schema)
}

if (!$capsule::schema()->hasTable($table)) {
$capsule::schema()->create($table, function (Blueprint $table) use($schema) {
$capsule::schema()->create($table, function ($table) use($schema) {
foreach ($schema as $key => $value) {
if ($key == "id" || $key == "_id") {
$table->increments($key);
Expand Down

0 comments on commit c9d6a1a

Please sign in to comment.