第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何修復(fù)我的 edit.blade.php 上的“語法錯誤,文件意外結(jié)束”?

如何修復(fù)我的 edit.blade.php 上的“語法錯誤,文件意外結(jié)束”?

PHP
皈依舞 2021-06-15 13:08:53
我正在嘗試使用 xampp 將編輯頁面添加到我的 laravel 網(wǎng)站,但是當(dāng)我嘗試運(yùn)行該鏈接時,它顯示“語法錯誤,文件意外結(jié)束”。這是我得到的錯誤:<?php echo $__env->make('master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\webLaravel\resources\views/edit.blade.php ENDPATH**/ ?>參數(shù)“語法錯誤,文件意外結(jié)束”我已經(jīng)嘗試在 PostController.php 上更改我的編輯功能public function edit($id){    $post = DB::table('posts')->where('id_kategori',$id)->get();    return view('edit',['posts'=>$post]);}這是我的 index.blade.php 上的按鈕 <td><a href="/post/edit/{{ $post->id_kategori }}"><button type="button" class="btn btn-edit stn-md">Edit </button></td>這是我在 web.php 中創(chuàng)建的路由Route::get('/post/edit/{id}','PostController@edit');
查看完整描述

2 回答

?
慕后森

TA貢獻(xiàn)1802條經(jīng)驗 獲得超5個贊

因為,您正在使用 獲取數(shù)據(jù)get(),所以我假設(shè)您正在使用@foreach循環(huán)遍歷表中的數(shù)據(jù)。您需要確保@foreach使用@endforeach刀片指令關(guān)閉循環(huán)來關(guān)閉循環(huán)。另外,請確保您正在關(guān)閉所有@ifwith@endif指令。


@foreach

.

.

.

.

@endforeach


查看完整回答
反對 回復(fù) 2021-06-19
?
慕標(biāo)5832272

TA貢獻(xiàn)1966條經(jīng)驗 獲得超4個贊

從您的代碼示例看來,您缺少結(jié)束 A 標(biāo)記!


您也不需要使用按鈕和 A 標(biāo)簽。試試這個...


 <td>

      <a class="btn btn-edit stn-md" href="/post/edit/{{ $post->id_kategori }}"> Edit </a>

 </td>


查看完整回答
反對 回復(fù) 2021-06-19
  • 2 回答
  • 0 關(guān)注
  • 140 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號