Created
May 26, 2019 07:43
-
-
Save hashihei/1b45c8f94d9f443a3e17fef7b51ec729 to your computer and use it in GitHub Desktop.
[myfirstcontroller]Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class myfirstController extends Controller | |
{ | |
public function index() | |
{ | |
//user php function | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
$user_ip = $_SERVER['REMOTE_ADDR']; | |
//make model instance | |
$model_db = new mysqlModel(); | |
$model_db_users = $model_db->getUsers(); | |
$model_db_hosts = $model_db->getHost(); | |
return view('ua_page',['user_agent' => $user_agent, 'ip' => $user_ip, | |
'modeldb_users' => $model_db_users, 'modeldb_hosts' => $model_db_hosts]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment