I have a textarea and I try to submit data with axios and vue to laravel but it doesn't work.I try to take the data and put ucfirst then return it.
new Vue({
el:'#root',
data:{
areamodel: ''
},
methods:{
insert:function(){
axios.post('/vue').then(response => this.areamodel = response.data);
}
}
});
and
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PostController extends Controller
{
public function vue(Request $request)
{
$abc = ucfirst($request->input('areamodel'));
return $abc;
}
}
console.log(response.data);