【问题标题】:Incorrectly nested style tag found then seeding database in laravel发现错误的嵌套样式标签,然后在 laravel 中播种数据库
【发布时间】:2019-01-03 11:04:11
【问题描述】:

然后我尝试播种我得到的 laravel 数据库:发现嵌套样式标签不正确。 我已按照文档的要求完成了所有操作,但无法理解此错误的原因

Symfony\Component\Console\Exception\InvalidArgumentException  : Incorrectly nested style tag found.

  at C:\wamp\www\advoca\vendor\symfony\console\Formatter\OutputFormatterStyleStack.php:75
    71|                 return $stackedStyle;
    72|             }
    73|         }
    74|
  > 75|         throw new InvalidArgumentException('Incorrectly nested style tag found.');
    76|     }
    77|
    78|     /**
    79|      * Computes current style with stacks top codes.

怎么了? 我的数据库播种机:

class DatabaseSeeder extends Seeder
{
    public function run()
    {
        $this->call([
            QueryTemplate_seeder::class,
        ]);
    }
}

我的 QueryTemplate_seeder :

<?php



class QueryTemplate_seeder extends Seeder
{

    public function run()
    {
           //1
           DB::table('query_templates')->insert([

            'content' => 'some string content',
            'queryid' => 111111,
            'customerId'=>'sdfsgdgsdgdsg'
        ]);

         //2
         DB::table('query_templates')->insert([

            'content' => 'some string content',
            'queryid' => 123456,
            'customerId'=>'sdgsdgsdgsdgfsdg'

        ]);

         //3
         DB::table('query_templates')->insert([

            'content' => 'some string content',
            'queryid' => 112233,
            'customerId'=>'adsgdfgsdfgdgs'
        ]);
    }
}

请帮忙!!!

【问题讨论】:

  • “某些字符串内容”是否包含一些html代码或内部带有单引号的文本?
  • 是的,我猜是问题所在)

标签: laravel seeding


【解决方案1】:

我通过删除所有种子并重新创建它们来解决问题。一切正常!

【讨论】:

    猜你喜欢
    • 2021-04-01
    • 2014-03-01
    • 1970-01-01
    • 2017-11-27
    • 2018-10-14
    • 1970-01-01
    • 2015-09-25
    • 2016-04-01
    相关资源
    最近更新 更多