Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-11-13 23:58:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f850eeab5aa3232cbe1dfd696ad8b1b880b8c434
f850eeab
1 parent
7ce7efc6
1.打印客户端ua
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
app/Http/Controllers/Controller.php
app/Http/Controllers/Controller.php
View file @
f850eea
...
...
@@ -6,6 +6,7 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use
Illuminate\Foundation\Bus\DispatchesJobs
;
use
Illuminate\Foundation\Validation\ValidatesRequests
;
use
Illuminate\Routing\Controller
as
BaseController
;
use
Illuminate\Support\Facades\Log
;
class
Controller
extends
BaseController
{
...
...
@@ -30,6 +31,7 @@ class Controller extends BaseController
}
else
if
(
strpos
(
$ua
,
'Android'
)
||
strpos
(
$ua
,
'android'
)){
return
'android'
;
}
else
{
Log
::
error
(
"user-agent:"
.
$ua
);
return
'unkown'
;
}
}
...
...
Please
register
or
login
to post a comment