Skip to content

Instantly share code, notes, and snippets.

Ryan Mortier ryanmortier

Block or report user

Report or block ryanmortier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ShahinSorkh / .php_cs
Last active Apr 6, 2020
php-cs-fixer config to follow laravel style guides
View .php_cs
$finder = PhpCsFixer\Finder::create()
calebporzio / tinker_helper.php
Created Jan 30, 2019
A quick, memorable way to initiate an "artisan tinker" session and play with variables.
View tinker_helper.php
function tinker(...$args) {
// Because there is no way of knowing what variable names
// the caller of this function used with the php run-time,
// we have to get clever. My solution is to peek at the
// stack trace, open up the file that called "tinker()"
// and parse out any variable names, so I can load
// them in the tinker shell and preserve their names.
calebporzio / HasUuid.php
Created Jul 5, 2018
A little trait to add to models that will have Uuids
View HasUuid.php
// Example usage in a model:
class ExampleModel extends Model
use HasUuid;
protected $primaryKey = 'uuid';
View AuthServiceProvider.php
namespace App\Providers;
use App\Permission;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
djaiss / progress_bar_migration_laravel.php
Last active Apr 13, 2020
Laravel: Use progress bars in migrations
View progress_bar_migration_laravel.php
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;
class DoSomething extends Migration
public function up()
$output = new ConsoleOutput();
meigwilym / console.php
Last active May 9, 2020
Laravel Create User Command
View console.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
View webpack.mix.js
// ...
let webpack = require("webpack");
plugins: [
// Choose the language you want to keep (Ex: "fr")
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/)
isuzuki / .php_cs
Last active Dec 3, 2019
Config for PHP-CS-Fixer ver 2 (based on laravel .php_cs
View .php_cs
* Config for PHP-CS-Fixer ver2
$rules = [
'@PSR2' => true,
// addtional rules
You can’t perform that action at this time.