public function sorting_posts(Request $R){
if( (!is_null($R->state) AND is_null($R->municipal) ) AND is_null($R->type) ){
$Posts = Post::latest('created_at')
->where('state_id',$R->state)
->where('category_id',$R->category_id)
->paginate(9);
return redirect()->route('by.category',$R->category_id)->with('Posts',$Posts);
}
}