<?php
namespace App\Http\Controllers\Ajax;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
abstract class AjaxEntityControllerAbstract
extends Controller
implements AjaxEntityControllerInterface {
static protected $model;
public function get($entityId) {
$entity = static::$model::find($entityId);
return response(['data' => $entity]);
}
}