app/Http/Controllers/HomeController.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)
    {
        $shop = Auth::user(); 
        $widget = new Widget();
        $widget->user_id = $shop->id;
        $widget->room = $request->get('room');
        $widget->position = $request->get('position');
        $widget->text = $request->get('text');
        $widget->html_code =$request->get('html_code');
        $widget->save();
        $this->AddCode($request->get('html_code'),$widget);
        $url = env('APP_URL');
        logger($url);
        $url = 'https://netzilatechnologies.com/artplacer/public';
        return response()->json($url);
    }
public function store ( Request $ request ) { $ shop = Auth :: user ( ) ; $ widget = new Widget ( ) ; $ widget -> user_id = $ shop -> id ; $ widget -> room = $ request -> get ( 'room' ) ; $ widget -> position = $ request -> get ( 'position' ) ; $ widget -> text = $ request -> get ( 'text' ) ; $ widget -> html_code = $ request -> get ( 'html_code' ) ; $ widget -> save ( ) ; $ this -> AddCode ( $ request -> get ( 'html_code' ) , $ widget ) ; $ url = env ( 'APP_URL' ) ; logger ( $ url ) ; $ url = 'https://netzilatechnologies.com/artplacer/public' ; return response ( ) -> json ( $ url ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .