Skip to content

Instantly share code, notes, and snippets.

View dinhquochan's full-sized avatar
😇
Hello Friend!

Dinh Quoc Han dinhquochan

😇
Hello Friend!
View GitHub Profile
@dinhquochan
dinhquochan / handle.php
Created March 2, 2019 04:11
Run `composer install` in Web Browser
<?php
declarce(strict_type=1);
use Composer\Console\Application;
use Composer\Command\UpdateCommand;
use Symfony\Component\Console\Input\ArrayInput;
define('COMPOSER_ROOT', __DIR__);
@dinhquochan
dinhquochan / web.php
Created March 29, 2019 04:13
Laravel Default Verify Email Routes
<?php
Route::get('email/verify', 'Auth\VerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}', 'Auth\VerificationController@verify')->name('verification.verify');
Route::get('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');
@dinhquochan
dinhquochan / tests.yml
Created April 16, 2020 07:40
Github Actions Config for Laravel Package
name: tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true

Keybase proof

I hereby claim:

  • I am dinhquochan on github.
  • I am dinhquochan (https://keybase.io/dinhquochan) on keybase.
  • I have a public key ASDsk46sZUU38_Q3k0FLgkMMcSsV_lPkWSbFx8L72cDuBAo

To claim this, I am signing this object:

@dinhquochan
dinhquochan / xdebug.ini
Created May 20, 2021 10:19
Xdebug in Version 3.x
[xdebug]
zend_extension=
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.client_host=127.0.0.1
xdebug.discover_client_host=true
xdebug.idekey=PHPSTORM
@dinhquochan
dinhquochan / php-version.sh
Created June 7, 2021 16:33
PHP Versions Switcher
function phpv() {
valet stop
brew unlink [email protected] php
brew link --force --overwrite $1
brew services start $1
composer global update
rm -f ~/.config/valet/valet.sock
valet install
}
@dinhquochan
dinhquochan / settings.json
Last active December 7, 2021 04:16
VSCode Settings
{
/**
* Better Defaults
**/
"editor.copyWithSyntaxHighlighting": false,
"editor.cursorSmoothCaretAnimation": true,
"diffEditor.ignoreTrimWhitespace": false,
"editor.emptySelectionClipboard": false,
"workbench.editor.enablePreview": false,
"window.newWindowDimensions": "inherit",
@dinhquochan
dinhquochan / Nord.icls
Created August 20, 2021 04:02
Custom Nord Color Scheme for Jetbrains IDEs
<scheme name="Nord" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2021-08-20T10:56:55</property>
<property name="ide">PhpStorm</property>
<property name="ideVersion">2021.2.0.0</property>
<property name="modified">2021-08-20T10:56:59</property>
<property name="originalScheme">_@user_Nord</property>
</metaInfo>
<colors>
<option name="ANNOTATIONS_COLOR" value="d8dee9" />
@dinhquochan
dinhquochan / AbstractController.php
Created August 31, 2021 07:43
Abstract Controller for Laravel (version 8.x)
<?php
namespace App\Http\Controllers;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller as BaseController;
@dinhquochan
dinhquochan / .php-cs-fixer.php
Last active November 12, 2023 10:44
PHP CS Fixer (PSR-12) - Laravel Compatible
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('storage/*')
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
;