Slide 1

Slide 1 text

-BSBWFMͰ.BSLEPXOΛ ϒϥ΢βʹදࣔ͢Δํ๏ 8FCº1)15FDI$BGF 4"8

Slide 2

Slide 2 text

XIPBNJ w ࢯ໊Ճ౻फҰ࿠ ࡀ ‣ େࡕࡏॅɾѪ஌ग़਎ ‣ ϋϯυϧωʔϜ4"8 w 4/4ΞΧ΢ϯτ ‣ 5XJUUFS!B[VLJ@FBUFS ‣ (JU)VCB[VLJQFOHVJO w ॴଐגࣜձࣾ.4&/ ೥໨ 2 FreeBSD macOS Linux Vue.js

Slide 3

Slide 3 text

.BSLEPXOΛ)5.-ʹม׵ͯ͠ૹ৴ w -BSBWFMͰ.BSLEPXOΛ)5.-ʹม׵ͯ͠Ϗϡʔʹ൓ө͍ͨ͠ ‣ ྫ.BSLEPXOͰهࣄΛॻ͚ΔϒϩάγεςϜͷ࡞੒ w 1)1ͷ.BSLEPXOύʔαϥΠϒϥϦcebe/markdownΛಋೖ ‣ ෳ਺ͷ.BSLEPXOॻࣜʹରԠ 5SBEJUJPOBM(JU)VC.BSLEPXO&YUSB 3

Slide 4

Slide 4 text

1)1.BSLEPXOύʔαϥΠϒϥϦͷൺֱ w DFCFNBSLEPXO ‣ ରԠॻࣜ5SBEJUJPOBM(JU)VC.BSLEPXO&YUSB w 1)1.BSLEPXO ‣ ରԠॻࣜ5SBEJUJPOBM.BSLEPXO&YUSB w 1BSTFEPXO ‣ ରԠॻࣜ(JU)VC 4

Slide 5

Slide 5 text

DFCFNBSLEPXOͷಋೖํ๏ w $PNQPTFSܦ༝ͰΠϯετʔϧ ‣ composer require cebe/markdown w .BSLEPXOύʔαΫϥεΛಡΈࠐΈ ‣ cebe\markdown\Markdown.BSLEPXOͷύʔαΫϥε ‣ cebe\markdown\GithubMarkdown(JU)VCॻࣜͷύʔαΫϥε ‣ cebe\markdown\MarkdownExtra.BSLEPXO&YUSBॻࣜͷύʔαΫϥε 5

Slide 6

Slide 6 text

DFCFNBSLEPXOͷར༻ํ๏ w .BSLEPXOύʔαΫϥεͷಡΈࠐΈ ‣ use cebe\markdown\GithubMarkdown; w ύʔαΠϯελϯεͷੜ੒ ‣ new GithubMarkdown(); w )5.-ܗࣜʹม׵ ‣ $parser->parse($markdown); 6 parse($md); } }

Slide 7

Slide 7 text

ม׵݁ՌΛϏϡʔʹ൓ө w #MBEFϑΝΠϧʹม׵಺༰ΛຒΊࠐΈ ‣ $parser->parse($md)͸)5.-ܗࣜͷจࣈྻΛฦ٫ ‣ {!! !!}Ͱ)5.-ͷΤεέʔϓΛ๷ࢭ 7
{!! $html !!}
  • Laravel
  • CakePHP
  • FuelPHP

Slide 8

Slide 8 text

.BSLEPXOύʔαͷར༻ྫ w .BSLEPXOͰهࣄΛฤू͢ΔϒϩάγεςϜ 8 Laravel ฤू ౤ߘɾϓϨϏϡʔ อଘ NE औಘ NE ม׵ IUNM ౤ߘ಺༰ͷ Ϗϡʔ ΫϥΠΞϯτ %# औಘ NE ฤूը໘

Slide 9

Slide 9 text

ιʔείʔυྫ 9 class Article extends Model { public function getBodyAttribute($value) { $parser = new GithubMarkdown(); $this->attributes[‘body’] = $parser->parse($value); } } class ArticleController extends Controller { public function index(Request $req, $id) { $article = Article::find($id); return view(‘article’, [ ‘article’ => $article ]); } }

{{ $article->title }}

{!! $article->body !!}

Slide 10

Slide 10 text

·ͱΊ w 1)1ͷ.BSLEPXOύʔαDFCFNBSLEPXOͷ঺հ ‣ ෳ਺ͷॻࣜʹରԠՄ w -BSBWFM΁ͷಋೖํ๏ͱར༻ํ๏Λઆ໌ ‣ ରԠ͢Δ.BSLEPXOύʔαͷछྨ ‣ .BSLEPXO͔Β)5.-΁ม׵͢Δํ๏ 10

Slide 11

Slide 11 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠