简体   繁体   English

如何在 Laravel 中安装 Slim Cropper?

[英]How to install Slim Cropper in Laravel?

I need to install Slim Cropper in Laravel ( https://pqina.nl/slim/ ).我需要在 Laravel ( https://pqina.nl/slim/ ) 中安装 Slim Cropper。 I downloaded it and I have two files: slim.jquery.min and slim.min.css.我下载了它,我有两个文件:slim.jquery.min 和 slim.min.css。 How can I install it?我该如何安装它? I think I need to use the webpack.min.js, but I dont know how to use it.我想我需要使用 webpack.min.js,但我不知道如何使用它。 Thanks!谢谢!

Well thats depends how you want do it.那么这取决于你想怎么做。 the quickest way could be simply, Add them to resources/layouts/app.blade.php in <head> .最快的方法可能很简单,将它们添加到<head>中的 resources/layouts/app.blade.php 中。 (assuming app.blade.php is your main layout file which you extending in all child views.) and use it like you would be using in normal html. (假设 app.blade.php 是您在所有子视图中扩展的主布局文件。)并像在普通 html 中使用一样使用它。 Nothing Fancy.没有什么花哨。 and for urls you can always use对于网址,您可以随时使用

<!-- Styles -->
<link href="{{ asset('css/slim.min.css') }}" rel="stylesheet">

<!-- script -->
<script src="{{ asset('js/slim.jquery.min.js') }}"></script>

which should load them from public/css and public/js folders.它应该从 public/css 和 public/js 文件夹中加载它们。

read more about asset function here https://laravel.com/docs/7.x/helpers#method-asset在此处阅读有关资产 function 的更多信息https://laravel.com/docs/7.x/helpers#method-asset

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM