Skip to content

Commit

Permalink
feat: register like config
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Sep 23, 2024
1 parent b1b1798 commit b062548
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config/like.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
'name' => 'Like',
'models' => [
'like' => \CSlant\Like\Models\Like::class,
],
];
8 changes: 8 additions & 0 deletions src/Models/Like.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace CSlant\Like\Models;

class Like
{

}
13 changes: 12 additions & 1 deletion src/Providers/LikeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function boot(): void
*/
public function register(): void
{
//
$this->registerConfigs();
}

/**
Expand All @@ -45,4 +45,15 @@ public function registerMigration(): void
{
$this->loadMigrationsFrom(__DIR__.'/../../migrations');
}

/**
* Register configs.
*
* @return void
*/
protected function registerConfigs(): void
{
$configPath = __DIR__.'/../../config/like.php';
$this->mergeConfigFrom($configPath, 'like');
}
}

0 comments on commit b062548

Please sign in to comment.