11<?php
22
3- namespace Encore \ Admin \LogViewer ;
3+ namespace Ladmin \LogViewer ;
44
5- use Encore \ Admin \Extension ;
5+ use Ladmin \Extension ;
66
77/**
88 * Class LogViewer.
@@ -136,7 +136,8 @@ public function getPrevPageUrl()
136136 }
137137
138138 return route ('log-viewer-file ' , [
139- 'file ' => $ this ->file , 'offset ' => $ this ->pageOffset ['end ' ],
139+ 'file ' => $ this ->file ,
140+ 'offset ' => $ this ->pageOffset ['end ' ],
140141 ]);
141142 }
142143
@@ -152,7 +153,8 @@ public function getNextPageUrl()
152153 }
153154
154155 return route ('log-viewer-file ' , [
155- 'file ' => $ this ->file , 'offset ' => -$ this ->pageOffset ['start ' ],
156+ 'file ' => $ this ->file ,
157+ 'offset ' => -$ this ->pageOffset ['start ' ],
156158 ]);
157159 }
158160
@@ -195,7 +197,7 @@ public function fetch($seek = 0, $lines = 20, $buffer = 4096)
195197 $ this ->pageOffset ['start ' ] = ftell ($ f );
196198
197199 while (!feof ($ f ) && $ lines >= 0 ) {
198- $ output = $ output. ($ chunk = fread ($ f , $ buffer ));
200+ $ output = $ output . ($ chunk = fread ($ f , $ buffer ));
199201 $ lines -= substr_count ($ chunk , "\n[20 " );
200202 }
201203
@@ -217,7 +219,7 @@ public function fetch($seek = 0, $lines = 20, $buffer = 4096)
217219 while (ftell ($ f ) > 0 && $ lines >= 0 ) {
218220 $ offset = min (ftell ($ f ), $ buffer );
219221 fseek ($ f , -$ offset , SEEK_CUR );
220- $ output = ($ chunk = fread ($ f , $ offset )). $ output ;
222+ $ output = ($ chunk = fread ($ f , $ offset )) . $ output ;
221223 fseek ($ f , -mb_strlen ($ chunk , '8bit ' ), SEEK_CUR );
222224 $ lines -= substr_count ($ chunk , "\n[20 " );
223225 }
0 commit comments