Skip to content

Instantly share code, notes, and snippets.

@lilashih
lilashih / beautifier.js
Created November 5, 2020 03:36 — forked from fzldn/beautifier.js
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
...
Beautifier.prototype.beautify = function() {
...
var source_text = this._source_text;
// BEGIN
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
@lilashih
lilashih / Laravel-Container.md
Created March 20, 2020 07:02
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

@lilashih
lilashih / laravel-admin-ckeditor.md
Last active February 19, 2020 09:23
Laravel-Admin擴展CKEditor圖片上傳

laravel-admin-ext/ckeditor 已經幫我們將CKEditor整合進laravel-admin的form了
而以下是針對該擴展的上傳圖片所寫的service

Factory

這邊是用來設置圖片上傳後要存到哪個目錄

  • BaseFactory.php
<?php