src/controllers/ApiController.php
public function run(Request $request, $path = '')
		{
			// data
			$data   = $request->get('_data', []);
			if (is_string($data))
			{
				$data = json_decode($data, JSON_OBJECT_AS_ARRAY);
			}

			// form
			$form   = $request->get('_form', null);
			parse_str($form, $form);

			// run
            return $this->sketchpad->run($path, $data, $form);
		}
public function run(Request $request, $path = '')
		{
			// data
			$data   = $request->get('_data', []);
			if (is_string($data))
			{
				$data = json_decode($data, JSON_OBJECT_AS_ARRAY);
			}

			// form
			$form   = $request->get('_form', null);
			parse_str($form, $form);

			// run
            return $this->sketchpad->run($path, $data, $form);
		}
public function run ( Request $ request , $ path = '' ) { // data $ data = $ request -> get ( '_data' , [ ] ) ; if ( is_string ( $ data ) ) { $ data = json_decode ( $ data , JSON_OBJECT_AS_ARRAY ) ; } // form $ form = $ request -> get ( '_form' , null ) ; parse_str ( $ form , $ form ) ; // run return $ this -> sketchpad -> run ( $ path , $ data , $ form ) ; }
Run a controller method

@param   Request     $request
@param   string      $path
@return  \Illuminate\View\View|mixed|string
Run a controller method