Skip to content

Instantly share code, notes, and snippets.

View TitasGailius's full-sized avatar

Titas Gailius TitasGailius

  • Namecheap.com
  • Vilnius, Lithuania
View GitHub Profile
<?php
class ClosureCache
{
/**
* The current globally available container (if any).
*
* @var static
*/
protected static $instance;
<?php
/**
* Let's pretend that we have this expensive
* function that takes up to 4 seconds to run
* and in this case, total time of execution
* would be 8 seconds.
*
*/
function buildRocket() : boolean
require('dotenv').config();
const env = process.env;
require('laravel-echo-server').run({
authHost: env.APP_URL,
devMode: env.APP_DEBUG,
database: "redis",
databaseConfig: {
redis: {
{
"name": "laravel-echo-server",
"version": "0.0.1",
"description": "Laravel Echo Server",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"dotenv": "^4.0.0",
"laravel-echo-server": "^1.2.8"
{
"data": [
{
"id": 1,
"name": "Eladio Schroeder Sr.",
"email": "therese28@example.com",
},
{
"id": 2,
"name": "Liliana Mayert",
axios.get('/api/posts')
.then(response => {
const meta = response.data.meta
const data = response.data.data // Looks weird
})
const { meta, data } = await axios.get('/api/posts')
/**
* First, we will load all of this project's Javascript utilities and other
* dependencies. Then, we will be ready to develop a robust and powerful
* application frontend using useful Laravel and JavaScript libraries.
*/
import "./bootstrap"
{
"compilerOptions": {
"target": "es5",
"strict": true,
"module": "es2015",
"moduleResolution": "node",
"experimentalDecorators": true,
},
"include": [
"resources/assets/js/**/*"
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}