public function web(Request $request, $type, $name) {
$tech = Technique::where('type', '=', $type)->where('name', '=', $name)->first();
if ($tech) {
- return view('app')
+ $view = view('app')
->with('title', $tech->getTranslatedProperty('title'))
->with('description', $tech->getTranslatedProperty('short'));
+ if ($tech->image) {
+ $view = $view->with('image', url($tech->image));
+ } else if ($tech->gif) {
+ $view = $view->with('image', url($tech->gif));
+ }
+ return $view;
}
$url_map = [
'dungeon' => 'dungeons',