Laravel mendapatkan permintaan SQL fasih dengan parameter
$query->toSql();
$query->getBindings()
Fernando Gunther
$query->toSql();
$query->getBindings()
request->getQueryString() // in blade template
$name = $request->query('name', 'Helen');
$request->input('name');
$request->input('user.name'); // fetch from user object
$campaign = Campaign::find($campaign_id);
$buyers = $campaign->buyers()->with('notes')->with(['emails' => function($q) use ($campaign_id){
$q->where('campaign_id', $campaign_id);
}])->get();
$request->fullUrl()