Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CakePHP: In about 15 minutes or less
Search
Justin Yost
December 02, 2016
Programming
0
38
CakePHP: In about 15 minutes or less
Run through of some basics with CakePHP in about 15 minutes for a framework roundtable.
Justin Yost
December 02, 2016
Tweet
Share
More Decks by Justin Yost
See All by Justin Yost
Laravel 6, 7 and Other Goodies
justinyost
2
86
PHP and Databases
justinyost
2
43
Ansible: What Is It and What Is It Good For?
justinyost
0
34
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
210
Middleware: Between the Framework and the Browser
justinyost
2
85
Caching and You and You and You and You...
justinyost
0
50
Git: The Pain and the Gain
justinyost
0
120
Generators: All About the Yield
justinyost
0
240
Other Decks in Programming
See All in Programming
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
150
はじめての Go * WASM * OCR
sgash708
1
140
クックパッド検索システム統合/Cookpad Search System Consolidation
giga811
0
200
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
320
JAWS Days 2025のインフラ
komakichi
1
380
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
380
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
210
RecSys2024 参加報告
unonao
1
130
AWS Step Functions は CDK で書こう!
konokenj
5
950
もっと大きなデータを送りませんか? エラーがゴロゴロ出るようなデータです
sublimer
0
120
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
270
オレを救った Cline を紹介する
codehex
16
15k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.5k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Site-Speed That Sticks
csswizardry
4
420
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
The Cost Of JavaScript in 2023
addyosmani
47
7.5k
Practical Orchestrator
shlominoach
186
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Transcript
CakePHP: In about 15 minutes or less Justin Yost Web
Developer at Loadsys CC BY-NC 4.0 Justin Yost 1
CakePHP Highlights — Convention over Configuration — MVC — "Build
fast, grow solid" — PHP 5.5+ — ORM blends ActiveRecord and Datamapper CC BY-NC 4.0 Justin Yost 2
CakePHP — composer create-project --prefer-dist cakephp/app {awesome-app} — Build Tables
— Setup DB configuration — bin/cake bake all {table-name} — Done with CRUD for {table-name} CC BY-NC 4.0 Justin Yost 3
CC BY-NC 4.0 Justin Yost 4
CakePHP Core Classes — Table — Entity — View —
Controller CC BY-NC 4.0 Justin Yost 5
CakePHP: Table public function findOwnedBy(Query $query, array $options) { $user
= $options['user']; return $query->where(['author_id' => $user->id]); } CC BY-NC 4.0 Justin Yost 6
CakePHP: Entity protected function _getFullName() { return $this->_properties['first_name'] . '
' . $this->_properties['last_name']; } CC BY-NC 4.0 Justin Yost 7
CakePHP: View <?php foreach ($users as $user): ?> <li class="user">
<?= $this->element('user', ['user' => $user]) ?> </li> <?php endforeach; ?> CC BY-NC 4.0 Justin Yost 8
CakePHP: Controller public function add() { $user = $this->Users->newEntity(); if
($this->request->is('post')) { $user = $this->Users->patchEntity($user, $this->request->data); if ($this->Users->save($user)) { $this->Flash->success(__('You are now registered.')); } else { $this->Flash->error(__('There were some problems.')); } } $this->set('user', $user); } CC BY-NC 4.0 Justin Yost 9
Why I like CakePHP — Rich and extensive core foundational
layer with lots of room to grow — ORM is amazing — Solid, Rich documentation CC BY-NC 4.0 Justin Yost 10
CakePHP Support, misc — cakephp.org — book.cakephp.org — api.cakephp.org CC
BY-NC 4.0 Justin Yost 11
Thanks/Questions? — twitter.com/justinyost — github.com/justinyost — justinyost.com — loadsys.com —
lynda.com/justinyost CC BY-NC 4.0 Justin Yost 12