first commit
This commit is contained in:
30
app/Http/Controllers/Admin/ManagePrivacyController.php
Normal file
30
app/Http/Controllers/Admin/ManagePrivacyController.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user