Hello @marianomoreyra I know and im sorry, I was going to write a longer post but I found out that I was confused about a few other things, like which models to use in the routes and I didn't know if the appends had any syntax error both in the routes or in the view.
The main view where the paginator exists is in the posts.index.
There is already a tags()in Post model, and well of course I have Tag model. but on the routes, which one do you reference? Could be convenient to use the Post since we're talking about sorting posts (but that may as well be the topic for another day, if maybe that is relatable to "best practices")
The problem at hand is this: how to use the paginator that exists in this view and still be able to have a string in the URL, in this case "tag"?
Well why did this became a problem in the first place? I think because Im displaying the paginator inside the index view and whenever I want to sort the posts by clicking on a given tag, the exceptions begin to emerge.
For example by adding this inside posts.index:
<span> {{ $posts->links() }} </span>
And after I've clicked on a post to see it's content, and select the given tag to view other posts that might have this tag also, the exception being thrown is this: http://flareapp.io/share/x7KKnKB7
Next thing I did was going over to my routes and then making a GET request for this given URL: http://my-blog.test/posts?tag=webdev So I did my best to extract it, the error could also be found here though, im not sure:
Route::get('posts/{tag}', function () {
$tag = Tag::simplePaginate()->withQueryString();
$tag->appends(['name' => 'tag']);
return view('posts.index', ['tag' => $tag]);
});
And well this is the beginning of another journey through Laravel :-) Thanks! :D
EDIT - I realize now I might've overlooked the fact that I included the wrong view under the routes. (!!)