Laravel Post 302重定向

我有五个laravel应用程序,它们在Windows apache2服务器中运行。 这些应用程序是在laravel 5.2.43中开发的。 新的应用程序是在laravel 5.5.46中开发的。

将新应用程序迁移到同一服务器后,我面临以下问题。

新应用程序问题(laravel 5.5.46)

将新应用程序迁移到同一服务器后,在正常提交以及ajax调用中提交表单时,我得到302重定向。 csrf_token是表单中可用的字段。

现有应用程序问题(laravel 5.2.43) 新的应用程序数据库中现有的应用程序搜索表。

我没有使用php artisan服务。 所有应用程序都像http://host/project/public

一样运行

请帮助我。

public function store(Request $request) {
$regsiteredVehicleDetails = TestVehicle::updateOrCreate(
                   ['vehicle_type_id' => $request->vehicle_type_id,'registration_no' => $request->registration_no,'model_name' => $request->model_name,'engine_no' => $request->engine_no,'vehicle_identification_number' => $request->vehicle_identification_number
                    ],['status' => $databaseStatusactive,'customer_id'=>null,'comments' => $comments]
                );
if ($regsiteredVehicleDetails->id) {
  Session::flash('message','Test Vehicle is registered successfully!..'); 
            Session::flash('status','success');
    } else {
   Session::flash('message','Something went wrong....!');
            Session::flash('unicode','Unicode is not generated');
            Session::flash('status','failure');
        }
     return redirect('tvr');
    }
okam6hz 回答:Laravel Post 302重定向

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3153974.html

大家都在问