2017-12-07 5 views
0

Laravel 5.5では、マスターブレードファイルでAuthを使用しましたが、正常に動作していますが、特定のブレードファイルでは、Authが見つかりません。このブレードでは、最初にデータベースからすべてのデータを取得し、再び同じブレードにデータを返すようにコントローラに要求を送信します。Laravel 5.5では、特定のブレードファイルのマスタが見つかりませんでした。Auth

public function invoiceReport(Request $request){ 

     $invoice = Invoice::latest()->get(); 
     return view('invoiceReport',['invoice' => $invoice]); 
} 

public function invoice_report_view(Request $request){ 

    $dateFrom = strtotime($request->example_daterange1); 
    $dateTo = strtotime($request->example_daterange2); 

    $start_date = date('Y-m-d', $dateFrom); 
    $end_date = date('Y-m-d', $dateTo); 


    $invoice = Invoice::with('customer')->whereBetween('created_at', [$start_date, $end_date])->latest()->get(); 



    return view('invoiceReport',compact('invoice')); 

} 
+0

私はそれでも何を意味するのか:) – lagbox

+0

をエラーが...その平均値を何んということです「ビューが見つからないが、認証を示している」わずかな手掛かりを持っていけません? – lagbox

答えて

0

あなたは何のIDも得ようとしません!
あなたはユーザーが認証されているかどうかを確認する必要があります。

@if(Auth::user()) 
//here you can retrieve the id 
関連する問題