Skip to content

Instantly share code, notes, and snippets.

View pringgojs's full-sized avatar
🎯
Focusing

Pringgo J. Saputro pringgojs

🎯
Focusing
  • Ponorogo, Indonesia
View GitHub Profile
# MEMPERBAIKI ERRO TOKEN MISMATCH KETIKA LOGIN
chmod 777 ./storage/framework/sessions
# ROUTING PUBLIC DIREKTORY LARAVEL TIDAK BISA DIRUBAH
# REDIRECT OTOMATIS KE FOLDER PUBLIC
BUAT FILE .htaccess di root folder
@pringgojs
pringgojs / merubah collection to array
Created January 22, 2019 10:34
merubah collection to array
public static function listPengawasArray()
{
$array_pengawas = self::where('user_id', auth()->user()->id)->get(['pengawas_id'])->mode('pengawas_id');
}
// response
array:2 [▼
0 => 1
1 => 2
]
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
@pringgojs
pringgojs / BlogController.php
Created March 24, 2019 10:01 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|assets)
RewriteRule ^(.*)$ http://localhost/client/dinas-simpak/index.php/$1 [L]
@pringgojs
pringgojs / Fix fungsi setValue phpWord
Created August 19, 2019 09:25
Digunakan untuk men set value di Word dengan pencarian ${string_yang_akan_direplace}
Tambahkan fungsi berikut di file `PhpOffice\PhpWord\TemplateProcessor`
// dev
public function setValueAdvanced($search_replace)
{
foreach ($this->tempDocumentHeaders as $index => $headerXML) {
$this->tempDocumentHeaders[$index] = $this->setValueForPartAdvanced($this->tempDocumentHeaders[$index], $search_replace);
}
{
"workbench.startupEditor": "newUntitledFile",
"files.autoSave": "onFocusChange",
"editor.tabSize": 2,
"eslint.packageManager": "yarn",
"eslint.validate": [
"javascript",
"html",
"javascriptreact",
{