Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

forward parameter from blade to another blade with filter

blade : 
{{ route('coupon.couponfilter', [$user->id,  $startDate, $endDate]) }}
web: 
Route::get('admin/couponfilter/{id}/{startDate}/{endDate}', 'CouponController@couponfilter')->name('coupon.couponfilter');

controller: 
public function couponfilter(Request $request)
 $coupon = Coupon::where('user_id', $request->id)->where('buy_date', '>=', $request->startDate)->where('buy_date', '<=', $request->endDate)->orderBy('buy_date', 'desc')->get();
return view('admin.coupon.index', compact('coupon'));
 
PREVIOUS NEXT
Tagged: #parameter #blade #blade #filter
ADD COMMENT
Topic
Name
4+6 =