9 comments

[ 2.3 ms ] story [ 38.5 ms ] thread
Neat hack. Not sure why you'd want to do this, but I don't usually let that stop me either. :D
Also see Livewire. I'm personally not a fan, but it's a interesting direction and definitely has its advantages. It's also unfortunately rather horrible on slow connections (imagine waiting 500ms for your fancy dropdown to open).

I think the end result will be a mix of javascript for localised interactivity and html over the wire for server side stuff (ex. datatables).

https://laravel-livewire.com/

Looks like a neat hack, but it also looks like it has path traversal issues, so be careful with it.

  $url = $request->url;
  $path = $this->rootDir.$url;
  $env = [ ... "SCRIPT_FILENAME" => $path,...]
  $process = proc_open('php-cgi', $descriptorspec, $pipes, $cwd, $env);