I'm trying to show the elements of a database in Laravel and I get this error
ErrorException array_merge(): Argument #2 is not an array (View: C:\wamp64\www\MYPROJECT\resources\views\news\index.blade.php)
I did not find services.json
and I already did composer update
The view is receiving the data because I printed it with dd('$variable')
and if it comes out, but somehow it gets damaged when I put the table:
@extends('layout.master')
@section('content')
<h1>News List</h1>
<p class="lead">Here's a list of all your tasks. <a href="http://localhost:8000/news/create">Add a new one?</a></p>
<table class="table table-striped">
<thead>
<th>Title</th>
<th>Article</th>
<th>Image</th>
<th width="280px">Options</th>
</thead>
<tbody>
@foreach($news as $info)
<tr>
<td>{{$info->title }}</td>
<td>{{$info->article}}</td>
<td>{{$info->image}}</td>
<td><a href="{{ view('news.show', $info->id) }}" class="btn btn-info">View Task</a>
<a href="{{ view('news.edit', $info->id) }}" class="btn btn-primary">Edit Task</a></td>
</tr>
@endforeach
</tbody>
</table>
@endsection
Only removing that part disappears the error, but I need to list what is stored in the database.