Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Nasrul Hazim Bin Mohamad nasrulhazim

🎯
Focusing
Block or report user

Report or block nasrulhazim

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
View Base.php
<?php
namespace App\Models;
use App\Contracts\Datatable as DatatableContract;
use App\Traits\HasDatatable;
use App\Traits\HasMediaExtended;
use App\Traits\SelectOptionTrait;
use App\Traits\WithDetailsTrait;
use Illuminate\Database\Eloquent\Model;
@nasrulhazim
nasrulhazim / RouteServiceProvider.php
Last active Nov 5, 2019
Organise Laravel Routes
View RouteServiceProvider.php
<?php
collect(
glob(base_path('/routes/web/*.php'))
)->each(function ($path) {
require $path;
});
@nasrulhazim
nasrulhazim / ReloadCacheCommand.php
Created Nov 5, 2019
Recache all Laravel caches - `reload:cache`
View ReloadCacheCommand.php
<?php
namespace App\Console\Commands\Reload;
use Illuminate\Console\Command;
class ReloadCacheCommand extends Command
{
/**
* The name and signature of the console command.
@nasrulhazim
nasrulhazim / create-pdo-informix.md
Last active Aug 25, 2019
Create PDO for Informix for MacOS
View create-pdo-informix.md

Download targeted Informix Client SDK

Extract the installer:

$ tar -xvf filename.tar

Install the Client SDK:

@nasrulhazim
nasrulhazim / install-informix.md
Created Aug 23, 2019
Informix DB Installation
View install-informix.md

Create Informix Group & User

# groupadd -g 1001 informix
# useradd -u 1001 -g informix informix
# passwd informix

Password: informix

@nasrulhazim
nasrulhazim / .php_cs
Created Jul 6, 2019 — forked from jwage/.php_cs
php-cs-fixer git pre commit hook
View .php_cs
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@nasrulhazim
nasrulhazim / github.sh
Created May 23, 2019
Personal Access Token for CLI - GitHub
View github.sh
composer config github-oauth.github.com your-personal-access-token
@nasrulhazim
nasrulhazim / composer.json
Created May 23, 2019
Private Repository in Application
View composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
@nasrulhazim
nasrulhazim / azure-pipelines.yml
Last active May 21, 2019 — forked from zanechua/azure-pipelines.yml
Azure Pipeline + Laravel + PHPUnit + Laravel Dusk
View azure-pipelines.yml
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
trigger:
- develop
pool:
vmImage: 'Ubuntu-16.04'
@nasrulhazim
nasrulhazim / DuskTestCase.php
Created May 21, 2019
Use SQLite in Laravel Dusk
View DuskTestCase.php
<?php
namespace Tests;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Laravel\Dusk\TestCase as BaseTestCase;
use Illuminate\Contracts\Console\Kernel;
You can’t perform that action at this time.