<?php

namespace App\Http\Controllers;

use App\BiCookies;
use Illuminate\Http\Request;

class BiCookiesController extends Controller
{

    public function receiveCookie(Request $request) {
//        \Log::info("here");
//        \Log::info(json_encode($request->input()));
        \Log::info($request->input("cookies"));
        BiCookies::updateOrCreate(['id' => 1], ["cookie" => base64_encode($request->input("cookies"))]);
//        echo json_encode($request);
    }
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\BiCookies  $biCookies
     * @return \Illuminate\Http\Response
     */
    public function show(BiCookies $biCookies)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\BiCookies  $biCookies
     * @return \Illuminate\Http\Response
     */
    public function edit(BiCookies $biCookies)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\BiCookies  $biCookies
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, BiCookies $biCookies)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\BiCookies  $biCookies
     * @return \Illuminate\Http\Response
     */
    public function destroy(BiCookies $biCookies)
    {
        //
    }
}
