Method Illuminate\View\View::response does not exist. when i want to fetch my data from table.
//my controller
public function admin()
{
$users = User::with('subs')->get();
//dd($users);
return view('admin')->response()->json([
'users' => $users,
], 200);
}
//my vue.js script
<script>
export default {
data(){
return{
users: []
}
},
methods: {
showUsers(){
axios.get('admin/routes').then(response => {
this.users = response.data.users;
});
}
},
mounted(){
this.showUsers();
}
}
</script>
my blade html code.
<tr v-for="user in users">
<td></td>
<td></td>
</tr>
Method Illuminate\View\View::response does not exist. when i want to fetch my data from table.
Method Illuminate\View\View::response does not exist. when i want to fetch my data from table.
Method Illuminate\View\View::response does not exist. when i want to fetch my data from table. Method Illuminate\View\View::response does not exist. when i want to fetch my data from table.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2xq7vYe
via IFTTT
Aucun commentaire:
Enregistrer un commentaire