I recently added this code to my utils package, so you are welcome to use it you want this. It's tree-shakable, so you don't have to worry about everything else!
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
# VSCode opens terminals in the project root, so this will make sure that | |
# you're using the correct version of npm and node | |
if [ -f .nvmrc ]; then | |
nvm install &> /dev/null | |
fi | |
# Change default prompt | |
PROMPT_COMMAND=__prompt_command | |
__prompt_command() { |
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\Providers; | |
use Laravel\Nova\Nova; | |
use Laravel\Nova\Cards\Help; | |
use Illuminate\Support\Facades\Gate; | |
use Laravel\Nova\NovaApplicationServiceProvider; | |
class NovaServiceProvider extends NovaApplicationServiceProvider |
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
<script> | |
let instancesCount = 0; | |
const rendersCache = {}; | |
// See live example: https://x3t7g.codesandbox.io/ | |
export default { | |
props: { | |
tag: { | |
type: String, | |
default: "div" |
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 Tests\Browser\Dusk; | |
use Tests\Testing\MailFake; | |
use Laravel\Dusk\Browser as BaseBrowser; | |
class Browser extends BaseBrowser { | |
public function fake($service) { |