dongzu3511
2018-08-27 13:53
浏览 318
已采纳

Laravel 5.7 - 使用命令'php artisan make:auth'后,Ckeditor停止显示

Before using the command

php artisan make:auth

the ckeditor, taken from the website https://github.com/UniSharp/laravel-ckeditor

was working fine.

After using the command, the ckeditor code has dissapeared in the file app.blade.php. In this case, the code

<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<script>
    CKEDITOR.replace( 'article-ckeditor' );
</script>

was put again in the app.blade.php and the following commands in the terminal were used once more:

composer require unisharp/laravel-ckeditor
php artisan vendor:publish --tag=ckeditor

Also,in the config/app.php in the addservice provider is still the:

Unisharp\Ckeditor\ServiceProvider::class,

I am doing tutorial from traversy media channel on the youtube, which link is the following laravel from scratch

My question is, what else I must write down in the Laravel, that the CKeditor will be visible.

图片转代码服务由CSDN问答提供 功能建议

在使用命令之前

  php artisan make:auth \  n   
 
 

ckeditor,取自网站 https ://github.com/UniSharp/laravel-ckeditor

工作正常。

使用命令后,ckeditor代码 在app.blade.php文件中消失了。 在这种情况下,代码

 &lt; script src =“/ vendor / unisharp / laravel-ckeditor / ckeditor.js”&gt;&lt; / script&gt; 
&lt; script&gt  ; 
 CKEDITOR.replace('article-ckeditor'); 
&lt; / script&gt; 
   
 
 

再次放入app.blade.php及以下内容 终端中的命令再次被使用:

  composer需要unisharp / laravel-ckeditor 
php artisan vendor:publish --tag = ckeditor 
   
 
 

此外,在addservice提供程序的config / app.php中仍然是:

  Unisharp \ Ckeditor \ ServiceProvider :: class,
    
 
 

我正在youtube上的traversy媒体频道上做教程,该链接如下 laravel from scratch

我的问题是,我还有什么必须 在Laravel中写下,CKeditor将可见。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • dongshi1934 2018-10-10 18:11
    最佳回答

    You done everything right, but after running this command

    php artisan make:auth
    

    The newly created app.blade.php contain "defer" in the line

    <script src="{{ asset('js/app.js') }}" defer></script>
    

    So remove the "defer", so it would be like

    <script src="{{ asset('js/app.js') }}"></script>
    

    and this will work.

    You can also move it to just before the </body> tag.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题