I need to change the table name during authorization, but I get the error Accessing static property App \ Http \ Controllers \ AuthController :: $ table_name as non static
AuthController.php
public static $table_name = 'server_1_users'; public function findOrNewUser($info) { $user = new User($this->table_name); $user = User::where('steam_id', $info->steamID64)->first(); } User.php public $ table;
public function __construct() { $this->table = AuthController::$table_name; }
new User($this->table_name);Why is$thisused if the property is static? - u_mulder