You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
618 B
28 lines
618 B
<?php |
|
|
|
namespace Tests\Models; |
|
|
|
use Encore\Admin\Traits\AdminBuilder; |
|
use Encore\Admin\Traits\ModelTree; |
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
class Tree extends Model |
|
{ |
|
use AdminBuilder, ModelTree; |
|
|
|
/** |
|
* Create a new Eloquent model instance. |
|
* |
|
* @param array $attributes |
|
*/ |
|
public function __construct(array $attributes = []) |
|
{ |
|
$connection = config('admin.database.connection') ?: config('database.default'); |
|
|
|
$this->setConnection($connection); |
|
|
|
$this->setTable(config('admin.database.menu_table')); |
|
|
|
parent::__construct($attributes); |
|
} |
|
}
|
|
|