This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>This is an example component</h1> | |
</template> | |
<script lang="ts"> | |
import Vue from "vue" | |
import Component from "vue-class-component" | |
@Component | |
export default class ExampleComponent extends Vue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.vue' { | |
import Vue from 'vue' | |
export default Vue | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"strict": true, | |
"module": "es2015", | |
"moduleResolution": "node", | |
"experimentalDecorators": true, | |
}, | |
"include": [ | |
"resources/assets/js/**/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { meta, data } = await axios.get('/api/posts') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.get('/api/posts') | |
.then(response => { | |
const meta = response.data.meta | |
const data = response.data.data // Looks weird | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"id": 1, | |
"name": "Eladio Schroeder Sr.", | |
"email": "[email protected]", | |
}, | |
{ | |
"id": 2, | |
"name": "Liliana Mayert", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const env = process.env; | |
require('laravel-echo-server').run({ | |
authHost: env.APP_URL, | |
devMode: env.APP_DEBUG, | |
database: "redis", | |
databaseConfig: { | |
redis: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |