main
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user