Skip to content

Commit

Permalink
fix laravel 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Recca Tsai committed Jul 11, 2016
1 parent 9169ccb commit 4abbc2d
Show file tree
Hide file tree
Showing 3 changed files with 281 additions and 43 deletions.
3 changes: 0 additions & 3 deletions resources/views/panel.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@php
$id = str_random(30);
@endphp
<div id="panel-terminal-shell-{{ $id }}" class="terminal-panel"></div>
<script>
(function() {
Expand Down
11 changes: 4 additions & 7 deletions src/Http/Controllers/TerminalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ public function __construct(ConsoleKernel $consoleKernel)
*
* @return mixed
*/
public function index(
ApplicationContract $app,
SessionManager $sessionManager,
Request $request,
$view = 'index'
) {
public function index(ApplicationContract $app, SessionManager $sessionManager, Request $request, $view = 'index')
{
$session = $sessionManager->driver();
if ($session->isStarted() === false) {
$session->setId($request->cookies->get($session->getName()));
Expand Down Expand Up @@ -79,8 +75,9 @@ public function index(
],
],
]);
$id = ($view === 'panel') ? str_random(30) : null;

return view('terminal::'.$view, compact('options', 'resources'));
return view('terminal::'.$view, compact('options', 'resources', 'id'));
}

/**
Expand Down
Loading

0 comments on commit 4abbc2d

Please sign in to comment.