mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
492 B
PHTML
21 lines
492 B
PHTML
6 months ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Api;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Models\Visitor;
|
||
|
use Illuminate\Http\Request;
|
||
|
|
||
|
class VisitorController extends Controller
|
||
|
{
|
||
|
//
|
||
|
public function display(Request $request){
|
||
|
$visitor = Visitor::where('ip', $request->ip())->orderByDesc('id')->first();
|
||
|
if ($visitor != null){
|
||
|
$visitor->display = $request->input('display',null);
|
||
|
$visitor->save();
|
||
|
}
|
||
|
return ['OK'=>true];
|
||
|
}
|
||
|
}
|