- Page 2 and 3: Laravel 4 Cookbook Christopher Pitt
- Page 4 and 5: Contents Dedication . . . . . . . .
- Page 6 and 7: CONTENTS Testing Endpoints . . . .
- Page 8 and 9: CONTENTS Installing Dependencies .
- Page 10 and 11: Forward Hi, my name is Wayne Ashley
- Page 12 and 13: Why Write This Book I was learning
- Page 14 and 15: Authentication If you’re anything
- Page 16 and 17: Authentication 3 . This file should
- Page 18 and 19: Authentication 5 1
- Page 20 and 21: Authentication 7 Creating A Model L
- Page 24 and 25: Authentication 11 . This file shoul
- Page 26 and 27: Authentication 13 1 @section("foote
- Page 28 and 29: Authentication 15 1 @extends("layou
- Page 30 and 31: Authentication 17 We define the Use
- Page 32 and 33: Authentication 19 1 public function
- Page 34 and 35: Authentication 21 1 @extends("layou
- Page 36 and 37: Authentication 23 1 @extends("layou
- Page 38 and 39: Authentication 25 . This file shoul
- Page 40 and 41: Authentication 27 18 public functio
- Page 42 and 43: Authentication 29 . Laravel include
- Page 44 and 45: Authentication 31 1
- Page 46 and 47: Authentication 33 14 login 15 16 @
- Page 48 and 49: Access Control List 35 17 18 return
- Page 50 and 51: Access Control List 37 The BaseMode
- Page 52 and 53: Access Control List 39 . This file
- Page 54 and 55: Access Control List 41 Another impo
- Page 56 and 57: Access Control List 43 1
- Page 58 and 59: Access Control List 45 32 $value =
- Page 60 and 61: Access Control List 47 116 } 117 11
- Page 62 and 63: Access Control List 49 . This was e
- Page 64 and 65: Access Control List 51 1 public fun
- Page 66 and 67: Access Control List 53 . This file
- Page 68 and 69: Access Control List 55 1
- Page 70 and 71: Access Control List 57 . This file
- Page 72 and 73:
Access Control List 59 . This file
- Page 74 and 75:
Access Control List 61 . This file
- Page 76 and 77:
Access Control List 63 1
- Page 78 and 79:
Access Control List 65 1
- Page 80 and 81:
Access Control List 67 1
- Page 82 and 83:
Access Control List 69 . You need t
- Page 84 and 85:
Deployment There are few things whi
- Page 86 and 87:
Deployment 73 We’re going to make
- Page 88 and 89:
Deployment 75 70 InputOption::VALUE
- Page 90 and 91:
Deployment 77 . This file should be
- Page 92 and 93:
Deployment 79 1 protected function
- Page 94 and 95:
Deployment 81 56 ] 57 ]; 58 } 59 60
- Page 96 and 97:
Deployment 83 16 $code .= "\n ],";
- Page 98 and 99:
Deployment 85 53 { 54 return [ 55 [
- Page 100 and 101:
Deployment 87 15 ] 16 ] 17 ]; . Thi
- Page 102 and 103:
Deployment 89 1 2 3 4 5 Laravel
- Page 104 and 105:
Deployment 91 52 ); 53 } 54 55 retu
- Page 106 and 107:
Deployment 93 . This file should be
- Page 108 and 109:
Deployment 95 63 InputArgument::REQ
- Page 110 and 111:
Deployment 97 43 { 44 $options["typ
- Page 112 and 113:
Deployment 99 36 37 $listener->onMo
- Page 114 and 115:
Deployment 101 . You have to have t
- Page 116 and 117:
Deployment 103 . This was extracted
- Page 118 and 119:
Deployment 105 . It’s important t
- Page 120 and 121:
Deployment 107 43 " . $pattern . "
- Page 122 and 123:
Deployment 109 26 27 $command = "rs
- Page 124 and 125:
Deployment 111 Command Portability
- Page 126 and 127:
API 113 1 php artisan controller:ma
- Page 128 and 129:
API 115 1 public function up() 2 {
- Page 130 and 131:
API 117 19 $table->text('descriptio
- Page 132 and 133:
API 119 1
- Page 134 and 135:
API 121 1
- Page 136 and 137:
API 123 1 php artisan db:seed . If
- Page 138 and 139:
API 125 12 ]; 13 14 public function
- Page 140 and 141:
API 127 17 * @return Response 18 */
- Page 142 and 143:
API 129 13 return Event::create([ 1
- Page 144 and 145:
API 131 23 Route::delete("event/{ev
- Page 146 and 147:
API 133 1 curl -X POST -d "name=foo
- Page 148 and 149:
API 135 1 public function setNameAt
- Page 150 and 151:
API 137 . Installing and running Me
- Page 152 and 153:
Packages Packages are the recommend
- Page 154 and 155:
Packages 141 Not so easy to test. T
- Page 156 and 157:
Packages 143 43 44 $provider = new
- Page 158 and 159:
Packages 145 35 class Archiver impl
- Page 160 and 161:
Packages 147 1
- Page 162 and 163:
Packages 149 . To recap; the comman
- Page 164 and 165:
Packages 151 . This file should be
- Page 166 and 167:
Packages 153 25 { 26 // ...watch as
- Page 168 and 169:
Packages 155 . chine.php. The main
- Page 170 and 171:
Packages 157 75 { 76 return new Com
- Page 172 and 173:
Packages 159 1
- Page 174 and 175:
Packages 161 1
- Page 176 and 177:
Packages 163 1
- Page 178 and 179:
Packages 165 1
- Page 180 and 181:
Packages 167 18 }, 19 "minimum-stab
- Page 182 and 183:
Real Time Chat One of the most perv
- Page 184 and 185:
Real Time Chat 171 PHP supports thi
- Page 186 and 187:
Real Time Chat 173 43 44 45 46
- Page 188 and 189:
Real Time Chat 175 18 App.Applicati
- Page 190 and 191:
Real Time Chat 177 29 { 30 return n
- Page 192 and 193:
Real Time Chat 179 16 17 public fun
- Page 194 and 195:
Real Time Chat 181 100 "message" =>
- Page 196 and 197:
Real Time Chat 183 16 return $this-
- Page 198 and 199:
Real Time Chat 185 39 40 $open = fu
- Page 200 and 201:
Real Time Chat 187 123 124 protecte
- Page 202 and 203:
Real Time Chat 189 debugging comman
- Page 204 and 205:
Real Time Chat 191 13 }); 14 15 soc
- Page 206 and 207:
Real Time Chat 193 27 }); 28 29 App
- Page 208 and 209:
Real Time Chat 195 1 5 6 7 8 La
- Page 210 and 211:
Multisites If you’ve ever had to
- Page 212 and 213:
Multisites 199 This line tells the
- Page 214 and 215:
Multisites 201 . This site definiti
- Page 216 and 217:
Multisites 203 . you would expect v
- Page 218 and 219:
Multisites 205 1
- Page 220 and 221:
Multisites 207 1 Route::group([ 2 "
- Page 222 and 223:
Multisites 209 1
- Page 224 and 225:
Multisites 211 1 public function bo
- Page 226 and 227:
Multisites 213 1
- Page 228 and 229:
Multisites 215 To make multi-langua
- Page 230 and 231:
Multisites 217 . You can learn more
- Page 232 and 233:
Multisites 219 1 php artisan migrat
- Page 234 and 235:
Multisites 221 1 2 {{ $post->title
- Page 236 and 237:
E-Commerce 223 Once you have Compos
- Page 238 and 239:
E-Commerce 225 1 "require" : { 2 "d
- Page 240 and 241:
E-Commerce 227 1
- Page 242 and 243:
E-Commerce 229 1
- Page 244 and 245:
E-Commerce 231 10 Schema::create("p
- Page 246 and 247:
E-Commerce 233 1
- Page 248 and 249:
E-Commerce 235 1
- Page 250 and 251:
E-Commerce 237 18 public function r
- Page 252 and 253:
E-Commerce 239 1 php artisan tinker
- Page 254 and 255:
E-Commerce 241 18 $price = $faker->
- Page 256 and 257:
E-Commerce 243 33 34 $used[] = $pro
- Page 258 and 259:
E-Commerce 245 . This file should b
- Page 260 and 261:
E-Commerce 247 1
- Page 262 and 263:
E-Commerce 249 16 21 25 29 30
- Page 264 and 265:
E-Commerce 251 100 104 Add to bask
- Page 266 and 267:
E-Commerce 253 184 185 186 187
- Page 268 and 269:
E-Commerce 255 . This was extracted
- Page 270 and 271:
E-Commerce 257 1 app.factory("Categ
- Page 272 and 273:
E-Commerce 259 33 34 Price: @{{ pr
- Page 274 and 275:
E-Commerce 261 23 this.setCategory
- Page 276 and 277:
E-Commerce 263 . This was extracted
- Page 278 and 279:
E-Commerce 265 1 app.controller("pr
- Page 280 and 281:
E-Commerce 267 43 44 items.push({ 4
- Page 282 and 283:
E-Commerce 269 We’ve added a stat
- Page 284 and 285:
E-Commerce 271 82 placeholder="card
- Page 286 and 287:
E-Commerce 273 1 public function ad
- Page 288 and 289:
E-Commerce 275 85 } . This was extr
- Page 290 and 291:
E-Commerce 277 15 App::bind("billin
- Page 292 and 293:
E-Commerce 279 You can learn more a
- Page 294 and 295:
E-Commerce 281 1 public function ge
- Page 296 and 297:
E-Commerce 283 61 Quantity 62 Amoun
- Page 298 and 299:
E-Commerce 285 Last thing to hook u
- Page 300 and 301:
Embedded Systems What do you think
- Page 302 and 303:
Embedded Systems 289 1
- Page 304 and 305:
Embedded Systems 291 16 socket.addE
- Page 306 and 307:
Embedded Systems 293 12 public func
- Page 308 and 309:
Embedded Systems 295 1
- Page 310 and 311:
Embedded Systems 297 1 #include 2
- Page 312 and 313:
Embedded Systems 299 85 else 86 { 8
- Page 314 and 315:
Embedded Systems 301 . This file sh
- Page 316 and 317:
Embedded Systems 303 the message ev
- Page 318 and 319:
Embedded Systems 305 1 setInterval(
- Page 320 and 321:
File-Based CMS 307 1 composer updat
- Page 322 and 323:
File-Based CMS 309 1
- Page 324 and 325:
File-Based CMS 311 25 "Formativ\Cms
- Page 326 and 327:
File-Based CMS 313 1 protected func
- Page 328 and 329:
File-Based CMS 315 41 42 43 44
- Page 330 and 331:
File-Based CMS 317 1 public functio
- Page 332 and 333:
File-Based CMS 319 26 try 27 { 28 e
- Page 334 and 335:
File-Based CMS 321 1
- Page 336 and 337:
File-Based CMS 323 21 22 23 24
- Page 338 and 339:
File-Based CMS 325 20 @foreach ($la
- Page 340 and 341:
File-Based CMS 327 20 == 21 "; 22 2
- Page 342 and 343:
File-Based CMS 329 1 Route::any("ad
- Page 344 and 345:
File-Based CMS 331 14 type="text" 1
- Page 346 and 347:
File-Based CMS 333 1 public functio
- Page 348 and 349:
File-Based CMS 335 43 44 return Vie
- Page 350 and 351:
File-Based CMS 337 127 "code" => "r
- Page 352 and 353:
File-Based CMS 339 27 Pages 28 29
- Page 354 and 355:
File-Based CMS 341 1 @extends("admi
- Page 356 and 357:
File-Based CMS 343 85 type="submit"
- Page 358 and 359:
File-Based CMS 345 72 class="form-c
- Page 360 and 361:
File-Based CMS 347 15 ) 16 { 17 $th
- Page 362 and 363:
File-Based CMS 349 99 } 100 } . Thi
- Page 364 and 365:
Controller Testing 351 1 composer
- Page 366 and 367:
Controller Testing 353 1 public fun
- Page 368 and 369:
Controller Testing 355 38 } . This
- Page 370 and 371:
Controller Testing 357 1
- Page 372 and 373:
Controller Testing 359 This makes t
- Page 374 and 375:
Controller Testing 361 29 ); 30 31
- Page 376 and 377:
Controller Testing 363 1 2 13 14
- Page 378 and 379:
Controller Testing 365 . You can fi
- Page 380 and 381:
Controller Testing 367 43 44 return
- Page 382 and 383:
Controller Testing 369 20 $requestM
- Page 384 and 385:
Controller Testing 371 25 [$reposit
- Page 386 and 387:
Controller Testing 373 109 $respons
- Page 388:
Controller Testing 375 . You can fi