<?php

namespace Modules\Splash\Http\Controllers;

use App\Functions\ResponseHelper;
use App\Http\Controllers\BasicController;
use Modules\Splash\Entities\Model;

class APIController extends BasicController
{
    public function index()
    {
        return ResponseHelper::make(Model::select('title_'.lang().' AS title', 'desc_'.lang().' AS desc', 'file as image')->get()->each(function ($item, $key) {
            $item->image = asset($item->image);
        }));
    }
}
