Skip to content

Instantly share code, notes, and snippets.

View EDDYMENS's full-sized avatar
🏕️

Edmond Mensah EDDYMENS

🏕️
View GitHub Profile
swagger: "2.0"
info:
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache 2.0"
<script>
var questions = {
"#index": {
question: "Which service do you use?",
options: [
{
description: "a) Service Only",
action: "#feedback-type"
},
{
Blog images in the comment
<?php
echo "Admin page here";
<?php
# This file was automatically generated by the MediaWiki 1.35.2
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:

Get a list of templates

This endpoint retrieves a list of available templates stored in eTrusted.

The result set can be filtered by adding request parameters.

  • URL

    /users/:id

class StatisticsController extends Controller {
public function dashboard(Request $request, $year) {
$year = $year ?? Carbon::now()->year;
if(!Cache::has('dashStatsCache-'.$year)) {
Artisan::call('logStats:run', [
'year' => $year,
]);
}
$stats = Cache::get('dashStatsCache-'.$year);
return view('dashboard')->with(compact('stats'));
@EDDYMENS
EDDYMENS / CalculatestaticsCommand.php
Last active March 4, 2021 13:27
Stats Caching Method
public function handle() {
$cachedStats = collect([]);
try {
$year = $this->argument('year') ?? Carbon::now()->year;
Log::whereYear('ended_at_date', $year)->chunk(300, function($logList) use(&$cachedStats)
{
foreach ($logList as $log)
{
$params = json_decode($log->params);
$logDate = $log->ended_at_date;
<?php
namespace Illuminate\Contracts\Container {
use Closure;
interface Container
{
public function bound($abstract);
public function alias($abstract, $alias);
public function tag($abstracts, $tags);
public function tagged($tag);
public function bind($abstract, $concrete = null, $shared = false);
(Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ enable}
laravel broken error