1. Go to this page and download the library: Download tommyys/laravel_library library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
...
use Axstarzy\LaravelLibrary\ActionLog;
use Axstarzy\LaravelLibrary\ErrorLog;
use Axstarzy\LaravelLibrary\Telegram;
...
//create new action log
$log = ActionLog::createRecord($request, $user); //$user is optional, if variable not passed it will use auth()->user() by default
//check time gap between last request
$gap = ActionLog::check30sGap($request);
class TestController extends Controller
{
public function foo(){
sqlLog(ActionLog::where('user_id', 1));
}
}