Skip to content

Commit

Permalink
Merge pull request #17 from ARCANEDEV/patch-fixing_config_key
Browse files Browse the repository at this point in the history
Fixing the config key
  • Loading branch information
arcanedev-maroc authored Jun 3, 2019
2 parents 122122a + 284e482 commit 8302725
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct()
parent::__construct();

$this->setTable(
config('laravel-messenger.discussions.table', 'discussions')
config('messenger.discussions.table', 'discussions')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct()
parent::__construct();

$this->setTable(
config('laravel-messenger.messages.table', 'messages')
config('messenger.messages.table', 'messages')
);
}

Expand All @@ -42,7 +42,7 @@ public function up()
$this->createSchema(function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('discussion_id');
$table->morphs(config("laravel-messenger.users.morph", 'participable'));
$table->morphs(config('messenger.users.morph', 'participable'));
$table->text('body');
$table->timestamps();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct()
parent::__construct();

$this->setTable(
config('laravel-messenger.participations.table', 'participations')
config('messenger.participations.table', 'participations')
);
}

Expand All @@ -42,7 +42,7 @@ public function up()
$this->createSchema(function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('discussion_id');
$table->morphs(config("laravel-messenger.users.morph", 'participable'));
$table->morphs(config('messenger.users.morph', 'participable'));
$table->timestamp('last_read')->nullable();
$table->timestamps();
$table->softDeletes();
Expand Down
8 changes: 2 additions & 6 deletions src/Bases/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ abstract class Migration extends BaseMigration
*/
public function __construct()
{
$this->setConnection(
config('laravel-messenger.database.connection')
);
$this->setPrefix(
config('laravel-messenger.database.prefix')
);
$this->setConnection(config('messenger.database.connection'));
$this->setPrefix(config('messenger.database.prefix'));
}
}
2 changes: 1 addition & 1 deletion src/Models/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Message extends Model implements MessageContract
public function __construct(array $attributes = [])
{
$this->setTable(
config('messenger.messeges.table', 'messages')
config('messenger.messages.table', 'messages')
);

parent::__construct($attributes);
Expand Down
8 changes: 2 additions & 6 deletions src/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ abstract class Model extends BaseModel
*/
public function __construct(array $attributes = [])
{
$this->setConnection(
config('messenger.database.connection')
);
$this->setPrefix(
config('messenger.database.prefix')
);
$this->setConnection(config('messenger.database.connection'));
$this->setPrefix(config('messenger.database.prefix'));

parent::__construct($attributes);
}
Expand Down

0 comments on commit 8302725

Please sign in to comment.