public function show(Request $request)
{
$this->validate($request, ['tid' => 'required|integer']);
$texture = Texture::find($_GET['tid']);
if (!$texture || $texture && !Storage::disk('textures')->has($texture->hash)) {
if (Option::get('auto_del_invalid_texture') == "1") {
if ($texture) {
$texture->delete();
}
abort(404, trans('skinlib.show.deleted'));
}
abort(404, trans('skinlib.show.deleted') . trans('skinlib.show.contact-admin'));
}
if ($texture->public == "0") {
if (is_null($this->user) || $this->user->uid != $texture->uploader && !$this->user->isAdmin()) {
abort(404, trans('skinlib.show.private'));
}
}
return view('skinlib.show')->with('texture', $texture)->with('with_out_filter', true)->with('user', $this->user);
}