This file contains 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
mix.options({ | |
hmrOptions: { | |
host: 'laravel.dev.local', // site's host name | |
port: 8080, | |
} | |
}); | |
// // fix css files 404 issue | |
mix.webpackConfig({ | |
// add any webpack dev server config here |
This file contains 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
@component('mail::message') | |
# Introduction | |
The body of your message. | |
@component('mail::button', ['url' => '']) | |
Button Text | |
@endcomponent | |
@component('mail::panel') |
This file contains 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 | |
namespace App\Helpers\General; | |
use Illuminate\Container\Container; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Support\Collection; |
This file contains 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 | |
namespace App\Console\Commands; | |
use App\Models\Course; | |
use Illuminate\Console\Command; | |
use Spatie\Browsershot\Browsershot; | |
use Spatie\Crawler\Crawler; | |
use Spatie\Sitemap\SitemapGenerator; | |
use Spatie\Sitemap\Tags\Url; |
This file contains 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 | |
/* | |
Eg. $array1: | |
array:1 [ | |
3 => array:1 [ | |
"subscription_id" => 27 | |
] | |
] | |
This file contains 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
let clock = { | |
timerIntervalId: null, | |
timer: 60, // 60 sec | |
startTimer: function(){ | |
// | |
function decrement(){ | |
if(this.timer < 0) | |
this.stopTimer() | |
else | |
this.timer -= 1 |
This file contains 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
// creating a new promise by instantiating the Promise Class | |
let somePromise = new Promise(function(resolve, reject){ | |
// the resolve and reject arguments are callback functions to be called. | |
// resolve: to be called when the promise is successful. We can pass data to it for the subsequent the 'then' method | |
// reject: to be called when the promise is unsuccessful. Again we can pass data to it for the 'catch' method | |
try{ | |
// to mimick asynchoronous behaviour, | |
// trigger the timeout callback in 1 sec | |
setTimeout(function(){ | |
console.log('hey there 1 sec later.') |
This file contains 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
// adding the 'async' keyword in front of a function will make it asynchronous. | |
// JS will automatically turn the output into a Promise | |
async function sayHello(){ | |
return 'Hello" | |
} | |
sayHello().then((response) => { | |
console.log(response) // expected output: 'Hello' | |
}) |
This file contains 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
# we are using the v3.7 syntax to write this docker compose file | |
version: "3.7" | |
# define a list | |
networks: | |
backend: | |
# the services section tells docker compose how to run the docker images | |
# a service can have multiple containers, all based on the same image | |
services: |
This file contains 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
@component('mail::message') | |
# Introduction | |
The body of your message. | |
@component('mail::button', ['url' => '']) | |
Button Text | |
@endcomponent | |
@component('mail::panel') |
OlderNewer