ok

Mini Shell

Direktori : /proc/self/root/home2/selectio/www/limpiar.in.net/app/Http/Controllers/
Upload File :
Current File : //proc/self/root/home2/selectio/www/limpiar.in.net/app/Http/Controllers/PolicyController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Policy;

class PolicyController extends Controller
{

    public function index($type)
    {
        $policy = Policy::where('name', $type)->first();
        return view('policies.index', compact('policy'));
    }

    //updates the policy pages
    public function store(Request $request){
        $policy = Policy::where('name', $request->name)->first();
        $policy->name = $request->name;
        $policy->content = $request->content;
        $policy->save();

        flash($request->name.' '.translate('updated successfully'));
        return back();
    }
}

Zerion Mini Shell 1.0