尝试使用vue js和laravel制作Web应用 当我使用api路由应用程序时,仅返回错误500 api.php:
Route::post('auther/create', 'AutherController@store');
客户端:
axios.post('api/auther/create', {
name: this.form.auther.name,
bigraphy: this.form.auther.bio,
}).then((result) => {
console.log(result);
}).catch((err) => {
console.log(err.response)
});
和控制器:
Auther::create($request->all());
return response('success',200)