kuvia/app/Http/Controllers/ThemeController.php
2021-02-09 01:04:17 +01:00

17 lines
594 B
PHP

<?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');
}
}