Migracia a male opravy

- csrf ocharana, vypnutie pre /log
- oprava loggovania pamate
- pridanie vue skriptov
This commit is contained in:
Jaroslav Drzik
2020-03-26 07:52:02 +01:00
parent 575b55bdc2
commit a4b7483048
50 changed files with 23176 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers;
use App\User;
use Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
class DataController extends Controller
{
/**
* Show the profile for the given user.
*
* @param int $computer_id
*/
public function get($id=null)
{
$where = [];
$computer_id = Request::input('computer_id');
$from = Request::input('from');
$to = Request::input('to');
$where[] = ["computer_id", '=', $computer_id];
if ($from) $where[] = ["created_at", '>=', $from];
if ($to) $where[] = ["created_at", '<=', $to];
$queries = DB::table('values')->where($where)->get();
return response()->json($queries);
}
}