Skip to content

Instantly share code, notes, and snippets.

@mohfahrul
mohfahrul / git snippet
Last active July 26, 2022 03:27
git snippet
# flow kerja
- git checkout -b feature-1234
- [coding]
- git add .
- git commit -m "mesage feature"
- git pull origin develop --rebase
- git push origin feature-1234 -f
- create pull request di website github / pakai extension
# log. melihat log commit
@mohfahrul
mohfahrul / composer snippet
Created March 25, 2022 09:05
composer snippet
# install. install all package dari composer.json
- composer install
# require. install package
- composer require <nama package>
# update
- composer update <nama package>
# remove
@mohfahrul
mohfahrul / Kuli.php
Last active March 31, 2022 07:16
Make Path Url with Base Url - Helper Magento
<?php
namespace Icube\Training\Helper;
use Magento\Framework\App\Helper\Context;
use Magento\Store\Model\StoreManagerInterface;
class Kuli extends \Magento\Framework\App\Helper\AbstractHelper
{
public $_storeManager;
public function __construct(
@mohfahrul
mohfahrul / Kuli.php
Last active March 31, 2022 07:12
Flush Cache - Helper Magento
<?php
namespace Icube\Training\Helper;
use Magento\Framework\App\Helper\Context;
use Magento\Framework\App\Cache\TypeListInterface;
use Magento\Framework\App\Cache\Frontend\Pool;
class Kuli extends \Magento\Framework\App\Helper\AbstractHelper
{
protected $cacheTypeList;
@mohfahrul
mohfahrul / Example.php
Last active March 31, 2022 07:24
Magento Redirect using { $this->_redirect } on Controller
<?php
namespace Icube\Training\Controller\Index;
use \Magento\Framework\App\Action\Action;
use \Magento\Framework\App\Action\Context;
class Example extends Action
{
protected $traineeFactory;