kuvia/app/Http/Controllers/ThemeController.php

18 lines
594 B
PHP
Raw Normal View History

2021-02-09 00:04:17 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class ThemeController extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
public function previewImage($typ, $name) {
$img = file_get_contents(__DIR__."/../../../resources/views/themes/".$typ."/".$name."/image.png");
return response($img)->header('Content-type','image/png');
}
}