Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "phoenix/eloquent-meta",
"name": "thescopogroup/eloquent-meta",
"description": "Attach meta data to Eloquent models",
"keywords": ["eloquent", "laravel", "meta"],
"homepage": "https://github.com/phoenix-labs/eloquent-meta",
Expand All @@ -16,7 +16,7 @@
],
"require": {
"php": ">=5.6.4",
"illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*"
"illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0|^9.0"
},
"require-dev": {
"phpunit/phpunit": "4.4.*"
Expand Down
5 changes: 3 additions & 2 deletions src/Phoenix/EloquentMeta/CreateMetaTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;

class CreateMetaTableCommand extends Command
{
Expand Down Expand Up @@ -37,7 +38,7 @@ public function __construct(FileSystem $filesystem)
*
* @return mixed
*/
public function fire()
public function handle()
{
$table_name = strtolower($this->argument('name'));
$migration = "create_{$table_name}_table";
Expand Down Expand Up @@ -66,7 +67,7 @@ public function fire()
$template = $this->fs->get($template_path);

// Replace what is necessary
$classname = 'Create'.studly_case(ucfirst($table_name)).'Table';
$classname = 'Create' . Str::studly(ucfirst($table_name)) . 'Table';

$contents = str_replace("'__meta__'", "'".$table_name."'", $template);
$contents = str_replace('SchemaTemplate', $classname, $contents);
Expand Down