app/Http/Controllers/RankingController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $ranking = new Ranking();
        $ranking->ip = $request->getClientIp();
        $ranking->product_id = $request->input('product_id');
        $ranking->save();
        return redirect('/')->with('message', 'Danke für das Feedback.');
    }
public function store ( Request $ request ) { $ ranking = new Ranking ( ) ; $ ranking -> ip = $ request -> getClientIp ( ) ; $ ranking -> product_id = $ request -> input ( 'product_id' ) ; $ ranking -> save ( ) ; return redirect ( '/' ) -> with ( 'message' , 'Danke für das Feedback.') ; }
Store a newly created resource in storage.
Store a newly created resource in storage .