23 lines
521 B
PHP
23 lines
521 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Controllers\SuperController;
|
|
use App\Models\Cnt;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ConstController extends SuperController
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(Cnt::class, [], ['*'], null, null, ['key']);
|
|
}
|
|
|
|
public function showValue($key){
|
|
$cnt = Cnt::where('key',$key)
|
|
->select('id','value','title_fa')->first();
|
|
return response()->json($cnt);
|
|
}
|
|
}
|