Laravel 4 preg_replace():参数不匹配,模式是字符串,而替换是数组错误

Laravel 4 preg_replace():参数不匹配,模式是字符串,而替换是数组错误,laravel-4,Laravel 4,我正在使用在另一个查询中检索到的值,而不是重新编写它们,我使用Session::set保存这些值,使用'Session::get'在上面的查询中检索这些值,我得到错误参数不匹配请发布您的会话:set code.Session::set'users.id',$appoints;Session::设置'appoint',$appoints$hosi=DoctorHospital::where'doctor\u id','=',Auth::user->id->first->hospital\u id;

我正在使用在另一个查询中检索到的值,而不是重新编写它们,我使用Session::set保存这些值,使用'Session::get'在上面的查询中检索这些值,我得到错误参数不匹配

请发布您的会话:set code.Session::set'users.id',$appoints;Session::设置'appoint',$appoints$hosi=DoctorHospital::where'doctor\u id','=',Auth::user->id->first->hospital\u id;$Appoints=DB::table'Appointment'->加入'users'、'users.id'、'='、'Appoints.patient_id'->其中'Appoints.hospital_id'、'='、$hosi->其中'users.type',1->选择'users.firstname'、'users.lastname'、'Appoints.about'、'Appoints.message'、'Appoints.created_at','appoints.id AS appoint'->orderBy'created_at','desc'->get;会话::设置'users.id',$appointment;Session::设置'appoint',$appoints;您不能直接从会话中获取doctorid。
public function assignprocessing() {

    $newassignment= new DoctorAppointment();
    $newassignment->doctor_id=Session::get('doctorid');
    $newassignment->patient_id=Session::get('users.id');
    $newassignment->appointment_id=Session::get('appoint');
    $newassignment->save();

    if ($newassignment->save()) {
        return View::make('hospital.appointments');
    }
}