dpdhnd3577 2017-11-25 04:37
浏览 63

Laravel:将自定义类导入迁移文件

I tried to import the class as in this article has been explained (method 3):

database/migrations/****_createOrdersTable.php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

use App\Extenders\References;

class CreateOrdersTable extends Migration {
// ...
}

I got the error

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'App\Extenders\References' not found

composer dump-autoload was not help.

  • 写回答

1条回答 默认 最新

  • doulaobi7988 2017-11-25 14:12
    关注

    I just forgot to declare namespace in References class:

    namespace App\Extenders;
    
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?