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

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.

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?