i m 试图推算数据表,其中i 曾用ja子重新填写表格,而不必再上页,但输入却被认为无效,尽管其不是
here s the js
function reloadProjects() {
// Make an AJAX request to get the latest project data from the server
$.ajax({
url: /get-latest-projects , // Adjust the route based on your Laravel setup
method: GET ,
dataType: json ,
success: function (data) {
// Update HTML with new data
var tbody = $( .table-responsive-data2 tbody );
tbody.empty(); // Clear existing data
// Loop through projects and append to the tbody
$.each(data, function (index, project) {
// Adjust the HTML structure based on your project data
var rowHtml = `
<tr class="tr">
<td >${project.input_date}</td>
<td >${project.nama_project}</td>
<td class="desc">${project.requestor}</td>
<td >${project.category_project}</td>
<td >
<span>${project.description_project}</span>
</td>
<td >${project.status}</td>
<td ><span class="status--process">${project.pic_project}</span></td>
<td >${project.eta_project}</td>
<td>
<div class="table-data-feature">
<button type="button" class="item" data-toggle="modal" data-target="#editModal${project.id}" data-placement="top" title="Edit">
<i class="zmdi zmdi-edit"></i>
</button>
<button class="item" data-toggle="tooltip" data-placement="top" title="Delete">
<i class="zmdi zmdi-delete"></i>
</button>
</div>
</td>
</tr>
`;
tbody.append(rowHtml);
});
},
error: function (error) {
console.error( Error fetching data: , error);
}
});
}
// Call the function on page load or based on some trigger
$(document).ready(function () {
reloadProjects();
});
页: 1
public function index()
{
$projects = Project::orderBy( id , desc )->paginate(5);
return view( table , compact( projects ));
}
// HomeController.php
// HomeController.php
public function getLatestProjects()
{
$projects = Project::orderBy( id , desc )->latest()->paginate(5); // Adjust as needed
return response()->json($projects);
}
i 试图在拉普雷克项目上将“植被”引入到控制器中,而是使复习功能无法完成,而如果拆除()则显示“无菌类型”错误: 不能读作无效的特性(阅读材料-日期)。
预先感谢