public function storeTransportPost(Request $request) { $loc = $request['loc']; $content = $request['description']; $type = $request['type']; $title = $request['title']; $salary = $request['cost']; $employerId = $request->user()->id; $TransPost = new job(); $TransPost->content = $content; $TransPost->type = $type; $TransPost->title = $title; $TransPost->salary = $salary; $TransPost->user_id = $employerId; $TransPost->location = $loc; $TransPost->save(); if ($request->ajax()) { $this->updateAllPosts($TransPost->toArray()); } return redirect('/userlogin'); }