add value host email and password from db global settings table
This commit is contained in:
@@ -17,7 +17,7 @@ class GlobalSettingsController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$query = GlobalSetting::query();
|
||||
$query = GlobalSetting::query()->orderBy('id','desc');
|
||||
return GlobalSettingResource::collection($query->paginate());
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ class ImportDatasourceController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$query = ImportDatasource::query();
|
||||
$query = ImportDatasource::query()->orderBy('id', 'desc');
|
||||
|
||||
if($request->has("search") && !empty($request->get("search"))){
|
||||
$search = $request->get("search");
|
||||
$query->where('status', 'like', "%".$search."%");
|
||||
}
|
||||
return ImportDatasourceResource::collection($query->paginate()->withQueryString());
|
||||
return ImportDatasourceResource::collection($query->paginate(10));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,9 @@ class GlobalSettingResource extends JsonResource
|
||||
'key' => $this->key,
|
||||
'value' => $this->value,
|
||||
'type' => $this->type,
|
||||
'description' => $this->description
|
||||
'description' => $this->description,
|
||||
'created_at' => $this->created_at->toDateTimeString(),
|
||||
'updated_at' => $this->updated_at->toDateTimeString(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user