Laravel是一个免费的开源PHP Web框架,由Taylor Otwell创建,用于遵循模型 - 视图 - 控制器(MVC)架构模式并基于Symfony开发Web应用程序。 Laravel的源代码托管在GitHub上,并根据MIT许可条款获得许可。
您好,我正在使用 Laravel 开发一个 WMS 项目,我需要打印一个表格(到 pdf),该表格由 3 个表格组成(处理时间较长)该表格中的每一行都有一个转换为的图像
我想从数组响应中访问一个值,但我得到 null 或异常“尝试获取非对象的属性”。 这是我的数组: 数组:5 [▼ 第677章 => 数组:4 [▶] 第676章...
我正在尝试循环遍历数组内的数组,以便可以显示电话号码或分机号码。例如:如果用户同时拥有(电话号码和分机号码),那么我...
我有一个数组 $data['result'] ,我可以通过 $data['result'] 访问它,我想访问结果数组中名为 items 的数组,然后再次访问该 items 中的 items 数组大批。拜...
因此,我通过 POST 请求从 Ionic 应用程序向 API 发送一组调味品,这些调味品在移动部分上表示为复选框。我想要获取已选中的复选框,以便我可以创建表...
使用 Laravel 从多个数据库表中获取值并按星期几进行分组
我想以这种格式在数组中插入数据。 第一天[ 屏幕1 [ ] 屏幕2 [ ] ] 第一天[ 屏幕1 [ ] 屏幕2 [ ] ] 到目前为止我已经尝试过: 对于 ($i = 0; $i < 7; $i++) { $date = Carbon...
我想以这种格式在数组中插入数据。 第一天[ 屏幕1 [ ] 屏幕2 [ ] ] 第一天[ 屏幕1 [ ] 屏幕2 [ ] ] 到目前为止我已经尝试过了。 对于($i=0;$i<7;$i++){ $date = Carbon:...
我试图将集合分成几个部分,从文档中举一个例子 $集合 = 收集([1, 2, 3, 4, 5, 6, 7]); $chunks = $collection->chunk(4); $chunks->all()...
我正在尝试运行 laravel 应用程序。 我有一个错误: 在 CacheManager.php 第 98 行: 缓存存储[]未定义。 脚本@php artisan package:discover --ansi 处理后自动加载转储...
如何在不使用 auth::attempt() 的情况下检查电子邮件和密码?
我尝试在登录页面使用 auth::attempt() 。但 auth::attempt() 总是返回 false。我尝试了旧的 stackoverflow 帖子中可用的所有其他方法,但仍然找不到正确的解决方案...
在 Laravel 中选择 MySQL 作为默认数据库后出现“Illuminate\Database\QueryException”错误
我最近尝试使用 VS Code 终端将我的 Laravel 应用程序配置为使用 MySQL 作为默认数据库。在设置过程中,选择MySQL后,遇到如下提示:...
我正在使用 Laravel 5.4。 当我第一次创建项目时,我进行了迁移和播种,一切都工作正常。 现在我删除了数据库,想再次重做迁移和播种,迁移工作...
Laravel Collection 按一列进行分组,并对每组内的另一列进行求和
我有一组数据需要进行处理才能生成报告。 输入示例: $arrival_data = [ [ “到达日期”=>“2020 年 12 月 9 日”, ...
我有一组数据需要进行处理才能生成报告 以下是提供的数据样本 $arrival_data = [ [ “到达日期” => &qu...
我正在使用 Laravel 的 encryptString 方法来加密我网站上的一些数据。它使用 OpenSSL 的 256 位 AES-CBC 加密,无需任何序列化。我现在正在尝试用 Python 解密该数据......
在 laravel 10 中使用 whereHas 过滤数据不起作用
我的程序是这样的 = $listreq2 = OutboundRequest::with('outboundmaterialrequest') ->whereIn('id', $outboundIds) ->whereHas('outboundmaterialrequest', function ($query) use ($ids) { $...
我想在循环中检查一些值,所以我创建和网络工作进程,如果该值是true,那么我停止网络工作人员并重新加载页面,所以这是我的问题,我在获取中一直没有结果
Laravel Eloquent 查询中的created_at 比较
我有一个查询,它应该返回“2024-04-19 21:00:47”之后创建的记录,但它无法正常工作。如果有任何想法请分享.. ChMessage::where(function ($q) u...
在我的 Statamic 资源蓝图中,我有一个用户字段,我想仅限于摄影师。我所有的摄影师用户都已被放入摄影师用户组中,并且根据...
在 Laravel 中使用 Javascript Fetch 加载更多
你们能帮我如何用我的javascript创建加载更多吗 这是我用于获取 API 资源的 javascript const filterProduct = 文档。</desc> <question vote="0"> <p>你们可以帮助我如何使用我的 javascript 创建加载更多</p> <p>这是我用于获取 API 资源的 javascript </p> <pre><code><script type="text/javascript"> const filterProduct = document.getElementById("filterProducts"); const domain = window.location.host if (filterProduct) { // Fetch JSON data and generate HTML fetch(`http://api.${domain}/v2/categories`) .then((response) => response.json()) .then((data) => { const generateCTGameHTML = (games, targetElementId) => { const gameListHTML = games .map( (game) => ` <a class="group relative transform overflow-hidden rounded-2xl bg-murky-700 duration-300 ease-in-out hover:shadow-2xl hover:ring-2 hover:ring-primary-500 hover:ring-offset-2 hover:ring-offset-murky-900" href="order/${game?.slug}" style="outline: none;"> <img alt="${game?.title}" width="192" height="288" class="aspect-[4/6] object-cover object-center" src="${game?.image}" style="color: transparent;"> <article class="absolute inset-x-0 -bottom-10 z-10 flex transform flex-col px-3 transition-all duration-300 ease-in-out group-hover:bottom-3 sm:px-4 group-hover:sm:bottom-4"> <h2 class="truncate text-sm font-semibold text-murky-200 sm:text-base">${game?.title}</h2> <p class="truncate text-xxs text-murky-400 sm:text-xs">${game?.production}</p> </article> <div class="absolute inset-0 transform bg-gradient-to-t from-transparent transition-all duration-300 group-hover:from-murky-900"></div> </a> ` ) .join(""); const gameListElement = document.getElementById(targetElementId); gameListElement.innerHTML = gameListHTML; }; data.forEach(function(cat){ generateCTGameHTML(cat.lists, cat.panel); }); }) .catch((error) => console.log("Error:", error)); } // Drawer Menu function drawerMenu() { return { open: false, usedKeyboard: false, init() { this.$watch('open', value => { value && this.$refs.closeButton.focus() this.toggleOverlay() }) this.toggleOverlay() }, toggleOverlay() { document.body.classList[this.open ? 'add' : 'remove']('h-screen', 'overflow-hidden') } } } </script> </code></pre> <p>这是我的html</p> <pre><code> <div id="filterProducts"> @foreach ($typecategories as $item) <div class="hidden" id="{{ preg_replace('/\s+/', '', $item->name) }}panel" role="tabpanel" aria-labelledby="{{ preg_replace('/\s+/', '', $item->name) }}panel-tab"> <div id="{{ preg_replace('/\s+/', '', $item->name) }}" class="grid grid-cols-3 gap-4 sm:grid-cols-4 sm:gap-x-6 sm:gap-y-8 lg:grid-cols-5 xl:grid-cols-6"></div> </div> @endforeach </div> </code></pre> <p>在我的html代码中没有添加加载更多按钮,因为我不知道如何在javascript系统中调用, 我需要加载更多不同形式的面板,比如我的 json</p> </question> <answer tick="false" vote="0"> <p>这是我的 json 表单 API</p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>[ { "_id": "B0AACBFC143915E51DA0", "panel": "TopUps", "lists": [ { "_id": "4D9D082AA579BC083B91", "title": "Mobile Legend", "production": "Moonton", "slug": "mobile-legend", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/B2C0EEDC2F7F3F3FED99.webp" }, { "_id": "9DBEA3A115CFCBF0588F", "title": "Call Of Dutty", "production": "Garena", "slug": "call-of-dutty", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/DAD584AD18173A577DB8.webp" }, { "_id": "262C4C5EE1E3155FD336", "title": "Free Fire", "production": "Garena", "slug": "free-fire", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/2EA149D36A8F45505FD1.webp" } ] }, { "_id": "352426BF7F7B9A697148", "panel": "Voucher", "lists": [ { "_id": "9AAB33BCF8405239AAC9", "title": "TESTING KATEGORI", "production": "TESTING", "slug": "testing-kategori", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/729B1BF05BC9F54A2696.webp" }, { "_id": "AFCF4BCE0B7FE85B3578", "title": "asdsda", "production": "asdasdasd", "slug": "asdsda", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/642AF002249DEDF5DD91.webp" }, { "_id": "DD890C5739C94F809296", "title": "asddassda", "production": "sdaasdsda", "slug": "asddassda", "image": "http:\/\/api.bjtopupku.test\/storage\/categories\/C7F9F5CBD230FB7D27F2.webp" } ] } ]</code></pre> </div> </div> <p></p> </answer> </body></html>