Skip to content

Commit ffaa753

Browse files
Rename model
1 parent a0cf064 commit ffaa753

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,11 @@
33
use Illuminate\Database\Eloquent\Model;
44

55
/**
6-
* Class Followable
6+
* Class Follower
77
* @package Lecturize\Followers\Models
88
*/
9-
class Followable extends Model
9+
class Follower extends Model
1010
{
11-
/**
12-
* @todo make this editable via config file
13-
* @inheritdoc
14-
*/
15-
protected $table = 'followables';
16-
1711
/**
1812
* @inheritdoc
1913
*/
@@ -34,6 +28,16 @@ class Followable extends Model
3428
*/
3529
protected $with = ['followable', 'follower'];
3630

31+
/**
32+
* @inheritdoc
33+
*/
34+
public function __construct()
35+
{
36+
parent::__construct();
37+
38+
$this->table = config('lecturize.followers.table', 'followers');
39+
}
40+
3741
/**
3842
* Morph followables
3943
*

0 commit comments

Comments
 (0)