how to pass data from controller to laravel component code example Example: laravel load view in variable $html = view('users.edit', compact('user'))->render();