Skip to content

Commit

Permalink
Suporte a versão anterior ao 9 do Laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpeixoto committed May 12, 2023
1 parent b76dbd2 commit 3a58c37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Migrations/MigrationCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ protected function getStub($table, $create)
/**
* Populate the place-holders in the migration stub.
*
* @param string $name
* @param string $stub
* @param string $table
* @return string
*/
protected function populateStub($stub, $table)
protected function populateStub($name, $stub, $table)
{
$stub = str_replace('DummyClass', $this->getClassName($name), $stub);
$stub = str_replace('DummyTable', $table, $stub);
$stub = str_replace('DummyColumnNameStatus', config('vespa.model_columns.status', ''), $stub);
$stub = str_replace('DummyColumnNameDate', config('vespa.model_columns.date', ''), $stub);
Expand Down
2 changes: 1 addition & 1 deletion src/Migrations/stubs/blank.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
class DummyClass extends Migration
{
protected $table = 'DummyTable';
protected $vespa_last_indexed_date = 'DummyColumnNameDate';
Expand Down

0 comments on commit 3a58c37

Please sign in to comment.