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
35
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
84
PHP and Databases
justinyost
2
42
Ansible: What Is It and What Is It Good For?
justinyost
0
30
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
82
Caching and You and You and You and You...
justinyost
0
47
Git: The Pain and the Gain
justinyost
0
120
Generators: All About the Yield
justinyost
0
230
Other Decks in Programming
See All in Programming
sappoRo.R #12 初心者セッション
kosugitti
0
280
生成AIで加速するテスト実装 - ロリポップ for Gamersの事例と 生成AIエディタの活用
kinosuke01
0
120
Ruby on cygwin 2025-02
fd0
0
180
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
140
Introduction to kotlinx.rpc
arawn
0
760
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
110
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
150
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
860
AIプログラミング雑キャッチアップ
yuheinakasaka
17
4.3k
CloudNativePGを布教したい
nnaka2992
0
110
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
1
210
Jakarta EE meets AI
ivargrimstad
0
340
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.5k
Git: the NoSQL Database
bkeepers
PRO
427
65k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
990
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Making Projects Easy
brettharned
116
6k
Automating Front-end Workflow
addyosmani
1368
200k
Music & Morning Musume
bryan
46
6.4k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
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