예제 #1
0
 /**
  * Index handler.
  *
  * @param \Psr\Http\Message\ServerRequestInterface $psrRequest
  * @param \Laravel\Passport\ClientRepository       $clients
  *
  * @return \Illuminate\Http\Response
  */
 public function index(ServerRequestInterface $psrRequest, ClientRepository $clients)
 {
     return $this->withErrorHandling(function () use($psrRequest, $clients) {
         $this->request->session()->put('authRequest', $authRequest = $this->server->validateAuthorizationRequest($psrRequest));
         $scopes = $this->parseScopes($authRequest);
         return $this->response->view('passport::authorize', ['client' => $clients->find($authRequest->getClient()->getIdentifier()), 'user' => $this->request->user(), 'scopes' => $scopes, 'request' => $this->request]);
     });
 }
예제 #2
0
 /**
  * @param \Symfony\Component\HttpKernel\Exception\HttpException $exception
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 protected function renderHttpException(HttpException $exception)
 {
     $status = $exception->getStatusCode();
     if ($this->view->exists("error::{$status}") && !$this->configuration->get('app.debug')) {
         return $this->response->view("error::{$status}", ['exception' => $exception], $status, $exception->getHeaders());
     } else {
         return $this->convertExceptionToResponse($exception);
     }
 }
예제 #3
0
 /**
  * index.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  * @param \Recca0120\Terminal\Kernel                   $kernel
  * @param \Illuminate\Http\Request                     $request
  * @param \Illuminate\Contracts\Response\Factory       $responseFactory
  * @param \Illuminate\Contracts\Routing\UrlGenerator   $urlGenerator
  * @param string                                       $view
  *
  * @return mixed
  */
 public function index(Application $app, Kernel $kernel, Request $request, ResponseFactory $responseFactory, UrlGenerator $urlGenerator, $view = 'index')
 {
     $kernel->call('--ansi');
     $csrfToken = null;
     if ($request->hasSession() === true) {
         $csrfToken = $request->session()->token();
     }
     $options = json_encode(['csrfToken' => $csrfToken, 'username' => 'LARAVEL', 'hostname' => php_uname('n'), 'os' => PHP_OS, 'basePath' => $app->basePath(), 'environment' => $app->environment(), 'version' => $app->version(), 'endpoint' => $urlGenerator->action('\\' . static::class . '@endpoint'), 'helpInfo' => $kernel->output(), 'interpreters' => ['mysql' => 'mysql', 'artisan tinker' => 'tinker', 'tinker' => 'tinker'], 'confirmToProceed' => ['artisan' => ['migrate', 'migrate:install', 'migrate:refresh', 'migrate:reset', 'migrate:rollback', 'db:seed']]]);
     $id = $view === 'panel' ? Str::random(30) : null;
     return $responseFactory->view('terminal::' . $view, compact('options', 'resources', 'id'));
 }
예제 #4
0
 public function view($id)
 {
     $permission = $this->permissionRepository->find($id);
     return $this->responseFactory->view('codeuser::admin.permission.view', compact('permission'));
 }
 /**
  * @param Request $request
  * @param $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Request $request, $id)
 {
     $tag = $this->repository->find($id);
     return $this->response->view('codetags::edit', compact('tag'));
 }
예제 #6
0
 public function index()
 {
     $tags = $this->tagRepository->all();
     return $this->responseFactory->view('codetag::index', compact('tags'));
 }
예제 #7
0
 public function index()
 {
     $users = $this->userRepository->all();
     return $this->responseFactory->view('codeuser::admin.user.index', compact('users'));
 }
예제 #8
0
 public function index()
 {
     $posts = $this->postRepository->all();
     return $this->responseFactory->view('codepost::index', compact('posts'));
 }
 public function index()
 {
     $categories = $this->categoryRepository->all();
     return $this->responseFactory->view('codecategory::index', compact('categories'));
 }
예제 #10
0
 /**
  * elfinder.
  *
  * @param \Illuminate\Contracts\Routing\ResponseFactory $responseFactory
  * @param \Illuminate\Session\SessionManager            $sessionManager
  *
  * @return mixed
  */
 public function elfinder(ResponseFactory $responseFactory, SessionManager $sessionManager)
 {
     $token = $sessionManager->driver()->token();
     return $responseFactory->view('elfinder::elfinder', compact('token'));
 }
예제 #11
0
 public function index()
 {
     $roles = $this->roleRepository->all();
     return $this->responseFactory->view('codeuser::admin.role.index', compact('roles'));
 }
 /**
  * @param Request $request
  * @param $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Request $request, $id)
 {
     $category = $this->repository->find($id);
     $categories = $this->repository->all()->lists('name', 'id')->toArray();
     return $this->response->view('codecategory::edit', compact('category', 'categories'));
 }