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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

缺少 [Route: showbilling] [URI: {locale}

缺少 [Route: showbilling] [URI: {locale}

PHP
收到一只叮咚 2021-06-17 18:01:15
我想這是我項(xiàng)目的最后一個(gè)問題。我在 1 個(gè)路由中有 2 個(gè)參數(shù){locale}/projects/{id}/billings,問題是我在視圖中傳遞了 2 個(gè)參數(shù)值,但它仍然提示缺少必需參數(shù)的錯(cuò)誤。這是我的代碼網(wǎng)頁(yè).phpRoute::group(['prefix' => '{locale}', 'where' => ['locale' => '[a-zA-Z]{2}'], 'middleware' => 'setlocale'], function () {    Route::get('/', function () {    return view('welcome');    })->name('main');    Auth::routes();    Route::get('/home', 'HomeController@index')->name('home');    //Customers    Route::get('/customers', 'CustomerController@showcust')->name('customers');    Route::post('/sendcust', 'CustomerController@sendcust')->name('sendcust');    //Items    Route::get('/items', 'ItemController@showitems')->name('items');    Route::post('/senditem', 'ItemController@senditem')->name('senditem');    //Projects    Route::get('/projects', 'ProjectController@showprojects')->name('projects');    Route::post('/sendproj', 'ProjectController@sendproj')->name('sendproj');    //ProjectBillings    Route::get('/projects/{id}/billings', 'ProjectController@showbilling')->name('showbilling');    Route::post('/sendbilling', 'ProjectController@addbilling')->name('sendbilling');       //Invoices    Route::get('/invoices', 'InvoiceController@showinvoice')->name('invoices');    Route::post('/sendinvoitem', 'InvoiceController@sendinvoitem')->name('sendinvoitem');    Route::get('/invoices/{id}/details', 'InvoiceController@showdetails');    Route::post('/updateitem','InvoiceController@updatedetail')->name('updateitem');    Route::get('invoices/{id}/generate', 'InvoiceController@generate');    Route::post('/updatestatus', 'InvoiceController@changestatus')->name('updatestatus');});項(xiàng)目.blade.php<a href="{{route('showbilling', ['locale' => app()->getLocale(), 'id' => $cat->id])}}" class="btn btn-default btn-xs waves-effect waves-float waves-green"> {{__('Add Billing')}} </a>項(xiàng)目控制器.phppublic function showbilling($locale, $id){   $billings = Project::find($id);   //return $billings;   return view('admin.addbillings', compact('billings'));}
查看完整描述

2 回答

?
ABOUTYOU

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

更新


您將參數(shù)錯(cuò)誤地傳遞給路由,您得到的錯(cuò)誤是在路由器方法而不是控制器中生成的,正確設(shè)置路由器方法,它應(yīng)該可以解決您的問題。


Route::prefix('{locale}')->middleware('setlocale')->group(function(){

    Route::get('/projects/{id}/billings', 'ProjectController@showbilling')->name('showbilling');

})->where('locale' => '[a-zA-Z]{2}');

結(jié)果 URI /{locale}/project/{id}/billings


查看完整回答
反對(duì) 回復(fù) 2021-06-19
?
慕姐4208626

TA貢獻(xiàn)1852條經(jīng)驗(yàn) 獲得超7個(gè)贊

我認(rèn)為你現(xiàn)在應(yīng)該使用這個(gè) URL:/{locale}/showbilling (例如:"as/showbilling") 而不是你現(xiàn)在使用的。{locale} 在路由器組中是有效的。所以,我猜你忘記了這個(gè)。


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

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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