Migracia na 6.0
- oprava chyb v log - welcome.blade url uprava
This commit is contained in:
10
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file → Executable file
10
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file → Executable file
@@ -19,14 +19,4 @@ class ForgotPasswordController extends Controller
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
||||
|
||||
3
app/Http/Controllers/Auth/LoginController.php
Normal file → Executable file
3
app/Http/Controllers/Auth/LoginController.php
Normal file → Executable file
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
@@ -25,7 +26,7 @@ class LoginController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
16
app/Http/Controllers/Auth/RegisterController.php
Normal file → Executable file
16
app/Http/Controllers/Auth/RegisterController.php
Normal file → Executable file
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
@@ -27,7 +29,7 @@ class RegisterController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
@@ -48,9 +50,9 @@ class RegisterController extends Controller
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ class RegisterController extends Controller
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
13
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file → Executable file
13
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file → Executable file
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
@@ -25,15 +26,5 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
}
|
||||
|
||||
6
app/Http/Controllers/Controller.php
Normal file → Executable file
6
app/Http/Controllers/Controller.php
Normal file → Executable file
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
|
||||
6
app/Http/Controllers/Logging.php
Normal file → Executable file
6
app/Http/Controllers/Logging.php
Normal file → Executable file
@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
|
||||
class Logging extends Controller
|
||||
{
|
||||
|
||||
private $_items = [ 'netstat_sent' => 'i', 'netstat_recv' => 'i', 'memory_free' => 'f', 'memory_total' => 'f', 'memory_used' => 'f', 'disk_free' => 'B', 'disk_percent' => 'f', 'disk_used' => 'B', 'disk_total' => 'B', 'processes' => 'i', 'temp' => 'i', 'load' => 'f', 'username' =>'s', 'computer' => 's'];
|
||||
public static $_items = [ 'netstat_sent' => 'i', 'netstat_recv' => 'i', 'memory_free' => 'f', 'memory_total' => 'f', 'memory_used' => 'f', 'disk_free' => 'B', 'disk_percent' => 'f', 'disk_used' => 'B', 'disk_total' => 'B', 'processes' => 'i', 'temp' => 'i', 'load' => 'f', 'username' =>'s', 'computer' => 's'];
|
||||
|
||||
private $_values = [];
|
||||
private $_ucache = [];
|
||||
@@ -46,7 +46,7 @@ class Logging extends Controller
|
||||
$id = DB::table('computers')->insertGetId(['computer' => $comp]);
|
||||
$this->_ccache[$comp] = $id;
|
||||
|
||||
\apc_store('computers',$this->_ccache);
|
||||
\apcu_store('computers',$this->_ccache);
|
||||
|
||||
return $id;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class Logging extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->_items as $k => $t) {
|
||||
foreach (self::$_items as $k => $t) {
|
||||
$val = $this->_values[$k];
|
||||
if ($t == 's') continue;
|
||||
|
||||
|
||||
0
app/Http/Controllers/Network.php
Normal file → Executable file
0
app/Http/Controllers/Network.php
Normal file → Executable file
0
app/Http/Controllers/Push.php
Normal file → Executable file
0
app/Http/Controllers/Push.php
Normal file → Executable file
62
app/Http/Controllers/Search.php
Normal file → Executable file
62
app/Http/Controllers/Search.php
Normal file → Executable file
@@ -10,19 +10,53 @@ use Illuminate\Support\Facades\DB;
|
||||
class Search extends Controller
|
||||
{
|
||||
public function autocomplete(){
|
||||
$term = Request::input('term');
|
||||
$results = array();
|
||||
|
||||
$queries = DB::table('network')
|
||||
->select('user')->distinct()
|
||||
->where('user', 'LIKE', $term.'%')
|
||||
->get();
|
||||
|
||||
foreach ($queries as $query)
|
||||
{
|
||||
$results[] = $query->user ;
|
||||
}
|
||||
return Response::json($results);
|
||||
}
|
||||
$term = Request::input('term');
|
||||
$users = array();
|
||||
$computers = array();
|
||||
$uin = [];
|
||||
$cin = [];
|
||||
$results = [];
|
||||
|
||||
$queries = DB::table('users')
|
||||
->select('id','name')
|
||||
->get();
|
||||
|
||||
foreach ($queries as $query)
|
||||
{
|
||||
$users[$query->id] = $query->name;
|
||||
if ($term && strpos($query->name, $term) === 0) {
|
||||
$uin[] = $query->id;
|
||||
}
|
||||
}
|
||||
|
||||
$queries = DB::table('computers')
|
||||
->select('id','computer')
|
||||
->get();
|
||||
|
||||
foreach ($queries as $query)
|
||||
{
|
||||
$computers[$query->id] = $query->computer ;
|
||||
if ($term && strpos(strtolower($query->computer),strtolower($term)) === 0) {
|
||||
$cin[] = $query->id;
|
||||
}
|
||||
}
|
||||
|
||||
$queries = DB::table('user_ip')
|
||||
->select('computer_id','user_id')->distinct()
|
||||
->whereIn('computer_id',$cin)
|
||||
->orWhereIn('user_id',$uin)
|
||||
->get();
|
||||
|
||||
foreach ($queries as $query) {
|
||||
$results[] = [ 'id' => $query->computer_id, 'computer' => $computers[$query->computer_id], 'user' => $users[$query->user_id]];
|
||||
}
|
||||
return Response::json($results);
|
||||
}
|
||||
|
||||
public function search($var = null)
|
||||
{
|
||||
$ip = Request::input('ip');
|
||||
$user = Request::input('user');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
0
app/Http/Controllers/Temperature.php
Normal file → Executable file
0
app/Http/Controllers/Temperature.php
Normal file → Executable file
Reference in New Issue
Block a user