app/Http/Controllers/Admin/AdsController.php
/**
     * set session cur campaign id.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
set session cur campaign id.
set session cur campaign id .
public function ajaxSetSessionCampaignId(Request $request)
    {
        if(request()->ajax()) {
            $id = $request->cmpid;
            session()->put('cur_cmpid', $id);
            return new JsonResponse([], 200);
        }
    }
public function ajaxSetSessionCampaignId ( Request $ request ) { if ( request ( ) -> ajax ( ) ) { $ id = $ request -> cmpid ; session ( ) -> put ( 'cur_cmpid' , $ id ) ; return new JsonResponse ( [ ] , 200 ) ; } }
set session cur campaign id.
set session cur campaign id .