<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Routing\Redirector;

use Illuminate\Support\Facades\App;

class PartsController extends Controller
{
    // /**
    //  * @return string
    //  */
    // public function index()
    // {
    //     return view('admin.pages.parts-list');
    // }

    // public function setParts(Request $request) {

    //     $content = $this->convertImageSource(file_get_contents("https://stat.ameba.jp/user_images/20190604/10/suzume-0513/32/88/j/o0828082814424107845.jpg"));

    //     $data = ['num' => $request['num'], 'id' => '', 'flag' => $request['flag']??'', 'content' => $content??''];
    //     return view('admin.objects.components.add-photo-image', $data);
    // }

    // function convertImageSource($imgData) {
    //     $base64 = base64_encode($imgData);
    //     $mime = 'image/jpg';
    //     return 'data:'.$mime.';base64,'.$base64;
    // }
}
