- Ensure you have Windows 10 & The Fall Creators Update installed.
- Uninstall Virtualbox
- Enable Hyper-V
- Create a new Virtual Switch in Hyper-V that is type "External" (You'll use this whenever asked)
Add / edit these 2 lines in your Homestead.yaml
<?php | |
//Don't forget to change the namespace! | |
namespace App\Traits; | |
use Cron\CronExpression; | |
use Illuminate\Support\Carbon; | |
use Illuminate\Console\Scheduling\ManagesFrequencies; | |
trait Schedulable{ |
<?php | |
// routes/console.php | |
// quickly create an user via the command line | |
Artisan::command('user:create', function () { | |
$name = $this->ask('Name?'); | |
$email = $this->ask('Email?'); | |
$pwd = $this->ask('Password?'); | |
// $pwd = $this->secret('Password?'); // or use secret() to hide the password being inputted | |
\DB::table('users')->insert([ |
<?php | |
namespace App\Commands\Database; | |
use Illuminate\Support\ServiceProvider; | |
class BindDatabaseServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ |
<?php | |
namespace App\Exceptions; | |
class Handler | |
{ | |
/** | |
* Convert a validation exception into a JSON response. | |
* | |
* @param \Illuminate\Http\Request $request |
Host github.com-jiggneshhgohel
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_work_gmail
AddKeysToAgent yes
Host csexperimental.abc.com
class EventSystem { | |
constructor() { | |
this.queue = {}; | |
} | |
publish(event, data) { | |
let queue = this.queue[event]; | |
if (typeof queue === 'undefined') { | |
return false; |
<?php | |
namespace App\Support; | |
class Optional | |
{ | |
/** | |
* The target being transformed. | |
* Use _ prefix to avoid namespace conflict on __get() | |
* |
// ... | |
let webpack = require("webpack"); | |
mix.webpackConfig({ | |
plugins: [ | |
// Choose the language you want to keep (Ex: "fr") | |
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/) | |
] | |
}); |
<?php | |
namespace AppBundle\Cache; | |
use JMS\DiExtraBundle\Annotation as DI; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Doctrine\Common\Cache\CacheProvider; | |
use AppBundle\Model\SomethingGeneratorInterface; | |
/** |