So I am not really sure how to go about this I have tried a few things and I will list one below however what I am trying to do is store information sent in a http request in a
Actually you are calling it statically, that's why it is not getting appropriate Request class and throwing error, can do as follows
use Illuminate\Http\Request;
//inside your controller
class YourClass extends Controller{
public function yourFunction(Request $request){
//for getting all the request
dd($request->all());
//for getting header content
dd($request->header('pubapi'));
}
}