AllanTatter\React\React::router PHP Method

router() public method

public router ( $routes, array $data = [], $path = null )
$data array
    public function router($routes, array $data = [], $path = null)
    {
        $props = json_encode($data);
        if (is_null($path)) {
            $path = \Request::path() == '/' ? '/' : '/' . \Request::path();
        }
        return $this->render('?type=react-router' . '&routes=' . urlencode($routes) . '&path=' . urlencode($path) . '&props=' . urlencode($props));
    }