欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

php artisan The use statement with non-compound name 'DB' has no effect

In PHP the use statement is more of an alias than import. So since the ClassesTableSeeder class isn't in a defined namespace, you don't need to import the DB class. As a result you can remove use DB entirely.

 
10下投票接受

在PHP中使用的语句别名优先于import因此,ClassesTableSeeder类不在一个定义的命名空间,你并不需要导入DB类。因此,您可以移除 use DB 

来自 http://stackoverflow.com/questions/31088292/laravel-php-artisan-dbseed-leads-to-use-statement-error


普通分类: