z-song / laravel-admin

Build a full-featured administrative interface in ten minutes
https://laravel-admin.org
MIT License
11.15k stars 2.82k forks source link

Column::extend() undefined #244

Closed gospeljohn closed 7 years ago

gospeljohn commented 7 years ago

当我在bootstrap添加扩展时,运行显示以下错误:

FatalErrorException in bootstrap.php line 25: Call to undefined method Encore\Admin\Grid\Column::extend() in bootstrap.php line 25

怎么回事,版本低的问题?

edwinhuish commented 7 years ago

请贴代码,不过初步判断,应该是没有 use Encore\Admin\Grid\Column;

gospeljohn commented 7 years ago

bootstrap.php的代码如下:

<?php

/**
 * Laravel-admin - admin builder based on Laravel.
 * @author z-song <https://github.com/z-song>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 * Encore\Admin\Form::forget(['map', 'editor']);
 *
 * Or extend custom form field:
 * Encore\Admin\Form::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */

use Encore\Admin\Grid\Column;
use App\Admin\Extensions\ExpandRow;

Column::extend('expand', ExpandRow::class);
z-song commented 7 years ago

请更新到最新版本