31 lines
911 B
PHP
31 lines
911 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Admin\privacy_policy;
|
|
|
|
class ManagePrivacyController extends Controller
|
|
{
|
|
|
|
public function index_privacy()
|
|
{
|
|
$policy = privacy_policy::all()->toArray();
|
|
return view('Admin.Pages.manage_cms.manage_privacy.manage_privacy')->with(['policy'=> $policy] );
|
|
}
|
|
|
|
|
|
public function update(Request $request)
|
|
{
|
|
$policy = privacy_policy::find($request->privacy_id);
|
|
$input = $request->input('privacy_discription');
|
|
$convertedInput = str_replace(' ', ' ', $input);
|
|
$policy->description = trim($convertedInput);
|
|
// $trim_disp = $request->input('privacy_discription');
|
|
// $policy->description = trim($trim_disp);
|
|
$policy->save();
|
|
return response()->json(['success' => true,'status'=>200]);
|
|
}
|
|
}
|