<?php
namespace App\Http\Controllers;
use App\Services\ArtikelService;
use App\Models\Artikel;
use Illuminate\Http\Request;
use DB;
class ArtikelController extends Controller
{
function artikel()
{
$artikels = DB::table('artikels')->paginate(14);
return view('/artikel', ['artikels' => $artikels]);
}
}
// I suppose your article has an ID, title and content, otherwise change it
<table>
<tr>
<th>ID</th>
<th>Title</th>
<ht>Content</th>
</tr>
@foreach($artikels as $artikel)
<tr>
<td>{{$artikel->id}}</td>
<td>{{$artikel->title}}</td>
<td>{{$artikel->content}}</td>
</tr>
@endforeach
</table>
{{ $artikels->links() }}
But as Snapey suggest, maybe start learning how to build a table firstly, as your posted table show that you don't understand how it works.
your view does not care which page it is on. It receives an array of articles that are zero based, irrespective of page number. You could hard code it for instance;