- Page 2 and 3: Laravel: Code Bright Web applicatio
- Page 4 and 5: Also By Dayle Rees Laravel: Code Ha
- Page 6 and 7: CONTENTS Response Shortcuts . . . .
- Page 8 and 9: CONTENTS Fetch Methods . . . . . .
- Page 10 and 11: Errata This may be my second book a
- Page 12 and 13: Translations If you would like to t
- Page 14 and 15: Introduction vi The simple yet conf
- Page 16 and 17: The Primers Hey this chapter wasn
- Page 18 and 19: The Primers 3 1
- Page 20 and 21: The Primers 5 1
- Page 22 and 23: The Primers 7 1 import dayle.blog.*
- Page 24 and 25: The Primers 9 1 { 2 "name": "Lushui
- Page 26 and 27: The Primers 11 1 { 2 "an_object": {
- Page 28 and 29: The Primers 13 Composer Composer is
- Page 30 and 31: The Primers 15 their Github usernam
- Page 32 and 33: The Primers 17 1 "role": "Genius" T
- Page 34 and 35: The Primers 19 You can add as many
- Page 38 and 39: The Primers 23 1 "autoload": { 2 "c
- Page 40 and 41: The Primers 25 1
- Page 42 and 43: The Primers 27 1 php composer.phar
- Page 44 and 45: The Primers 29 21 22 - Installing x
- Page 46 and 47: The Primers 31 1 Loading composer r
- Page 48 and 49: Architecture I want to make Code Br
- Page 50 and 51: Architecture 35 1
- Page 52 and 53: Architecture 37 The Facade in this
- Page 54 and 55: Getting Started Laravel is a framew
- Page 56 and 57: Getting Started 41 Note that the ve
- Page 58 and 59: Getting Started 43 The next task wi
- Page 60 and 61: Getting Started 45 43 location ~ /\
- Page 62 and 63: Getting Started 47 • autoload.php
- Page 64 and 65: Getting Started 49 The Application
- Page 66 and 67: Basic Routing You are on a long, st
- Page 68 and 69: Basic Routing 53 1
- Page 70 and 71: Basic Routing 55 1 http://domain.co
- Page 72 and 73: Basic Routing 57 12 { 13 return "Bo
- Page 74 and 75: Responses When someone asks you a q
- Page 76 and 77: Responses 61 1
- Page 78 and 79: Responses 63 Redirects A Redirect i
- Page 80 and 81: Responses 65 1
- Page 82 and 83: Responses 67 object actually inheri
- Page 84 and 85: Responses 69 1
- Page 86 and 87:
Filters I recall a couple of years
- Page 88 and 89:
Filters 73 1
- Page 90 and 91:
Filters 75 1
- Page 92 and 93:
Filters 77 1
- Page 94 and 95:
Filters 79 1
- Page 96 and 97:
Filters 81 First we need to create
- Page 98 and 99:
Filters 83 All of these filters rel
- Page 100 and 101:
Controllers 85 it would make sense
- Page 102 and 103:
Controllers 87 1
- Page 104 and 105:
Controllers 89 Here we have our Art
- Page 106 and 107:
Blade 91 standard view files. The o
- Page 108 and 109:
Blade 93 1 2 3 {{{ 'alert("CHUNKY
- Page 110 and 111:
Blade 95 1 2 3 c~~p ,---------. 4
- Page 112 and 113:
Blade 97 1 2 3 4 5 6 7 Narwhal
- Page 114 and 115:
Blade 99 1 @section('head') 2 3 @s
- Page 116 and 117:
Blade 101 11 We have a template! 12
- Page 118 and 119:
Blade 103 24 25 @extends('third')
- Page 120 and 121:
Advanced Routing Oh I see, you’re
- Page 122 and 123:
Advanced Routing 107 1
- Page 124 and 125:
Advanced Routing 109 1
- Page 126 and 127:
Advanced Routing 111 1
- Page 128 and 129:
Advanced Routing 113 1
- Page 130 and 131:
URL Generation 115 1 http://myapp.d
- Page 132 and 133:
URL Generation 117 1
- Page 134 and 135:
URL Generation 119 1 http://myapp.d
- Page 136 and 137:
URL Generation 121 However, in some
- Page 138 and 139:
URL Generation 123 1 2 3 My Route
- Page 140 and 141:
Request Data Data, and its manipula
- Page 142 and 143:
Request Data 127 1 2 3 4 5 6 7
- Page 144 and 145:
Request Data 129 1 string(3) "bar"
- Page 146 and 147:
Request Data 131 1 array(2) { ["foo
- Page 148 and 149:
Request Data 133 1
- Page 150 and 151:
Request Data 135 13 var_dump(Input:
- Page 152 and 153:
Request Data 137 1
- Page 154 and 155:
Request Data 139 1
- Page 156 and 157:
Request Data 141 We have added the
- Page 158 and 159:
Request Data 143 1 application/pdf
- Page 160 and 161:
Request Data 145 1
- Page 162 and 163:
Request Data 147 The withCookie() m
- Page 164 and 165:
Forms It was a cold, dark night in
- Page 166 and 167:
Forms 151 1 2 3 4 5 Here, we use
- Page 168 and 169:
Forms 153 1 2 3 5 7 Great! Whil
- Page 170 and 171:
Forms 155 1 2 3 {{ Form::open(arra
- Page 172 and 173:
Forms 157 1 2 3 6 8 First Name 9
- Page 174 and 175:
Forms 159 Password Fields Some thin
- Page 176 and 177:
Forms 161 1 2 3 {{ Form::open(arra
- Page 178 and 179:
Forms 163 1 2 3 {{ Form::open(arra
- Page 180 and 181:
Forms 165 1 2 3 {{ Form::open(arra
- Page 182 and 183:
Forms 167 Normal Buttons When we ne
- Page 184 and 185:
Forms 169 1
- Page 186 and 187:
Forms 171 ARGH. We are all gonna di
- Page 188 and 189:
Validation A few months ago I was g
- Page 190 and 191:
Validation 175 Simple Validation Do
- Page 192 and 193:
Validation 177 1
- Page 194 and 195:
Validation 179 22 23 if ($validator
- Page 196 and 197:
Validation 181 17 'username' => 'mi
- Page 198 and 199:
Validation 183 1
- Page 200 and 201:
Validation 185 1 array( 2 'field' =
- Page 202 and 203:
Validation 187 1 array( 2 'field' =
- Page 204 and 205:
Validation 189 1 array( 2 'field' =
- Page 206 and 207:
Validation 191 1 array( 2 'field' =
- Page 208 and 209:
Validation 193 1
- Page 210 and 211:
Validation 195 1
- Page 212 and 213:
Validation 197 We are redirected ba
- Page 214 and 215:
Validation 199 20 {{ Form::password
- Page 216 and 217:
Validation 201 1 2 3 Registration
- Page 218 and 219:
Validation 203 1
- Page 220 and 221:
Validation 205 1
- Page 222 and 223:
Validation 207 1
- Page 224 and 225:
Databases 209 As you can see, you h
- Page 226 and 227:
Databases 211 17 'charset' => 'utf8
- Page 228 and 229:
Databases 213 1 'my_connection' =>
- Page 230 and 231:
Databases 215 Preparing If you want
- Page 232 and 233:
Schema Builder 217 The second param
- Page 234 and 235:
Schema Builder 219 1
- Page 236 and 237:
Schema Builder 221 1
- Page 238 and 239:
Schema Builder 223 1
- Page 240 and 241:
Schema Builder 225 boolean Not all
- Page 242 and 243:
Schema Builder 227 1
- Page 244 and 245:
Schema Builder 229 Special Column T
- Page 246 and 247:
Schema Builder 231 1
- Page 248 and 249:
Schema Builder 233 1
- Page 250 and 251:
Schema Builder 235 1 +-------+-----
- Page 252 and 253:
Schema Builder 237 1
- Page 254 and 255:
Schema Builder 239 1 +-------+-----
- Page 256 and 257:
Schema Builder 241 1
- Page 258 and 259:
Schema Builder 243 1
- Page 260 and 261:
Schema Builder 245 1
- Page 262 and 263:
Migrations We have a rather impress
- Page 264 and 265:
Migrations 249 1
- Page 266 and 267:
Migrations 251 Before we continue t
- Page 268 and 269:
Migrations 253 Simply change the mi
- Page 270 and 271:
Migrations 255 12 public function u
- Page 272 and 273:
Migrations 257 As you can see, our
- Page 274 and 275:
Migrations 259 1 $ php artisan migr
- Page 276 and 277:
Eloquent ORM 261 18 } 19 20 $book =
- Page 278 and 279:
Eloquent ORM 263 1
- Page 280 and 281:
Eloquent ORM 265 Let’s visit the
- Page 282 and 283:
Eloquent ORM 267 13 */ 14 public fu
- Page 284 and 285:
Eloquent ORM 269 1
- Page 286 and 287:
Eloquent ORM 271 We have used the s
- Page 288 and 289:
Eloquent ORM 273 1 mysql> select *
- Page 290 and 291:
Eloquent ORM 275 1
- Page 292 and 293:
Eloquent Queries In the previous ch
- Page 294 and 295:
Eloquent Queries 279 1
- Page 296 and 297:
Eloquent Queries 281 Thanks to this
- Page 298 and 299:
Eloquent Queries 283 I don’t beli
- Page 300 and 301:
Eloquent Queries 285 24 id: 4, 25 t
- Page 302 and 303:
Eloquent Queries 287 1
- Page 304 and 305:
Eloquent Queries 289 1
- Page 306 and 307:
Eloquent Queries 291 Update We don
- Page 308 and 309:
Eloquent Queries 293 1
- Page 310 and 311:
Eloquent Queries 295 1
- Page 312 and 313:
Eloquent Queries 297 1 Matt Nathans
- Page 314 and 315:
Eloquent Queries 299 1
- Page 316 and 317:
Eloquent Queries 301 In the above e
- Page 318 and 319:
Eloquent Queries 303 1 [ 2 { 3 id:
- Page 320 and 321:
Eloquent Queries 305 1
- Page 322 and 323:
Eloquent Queries 307 10 id: 4, 11 t
- Page 324 and 325:
Eloquent Queries 309 1 select * fro
- Page 326 and 327:
Eloquent Queries 311 WhereNull The
- Page 328 and 329:
Eloquent Queries 313 1
- Page 330 and 331:
Eloquent Queries 315 1
- Page 332 and 333:
Eloquent Queries 317 1
- Page 334 and 335:
Eloquent Queries 319 1
- Page 336 and 337:
Eloquent Collections I love collect
- Page 338 and 339:
Eloquent Collections 323 22 'genre'
- Page 340 and 341:
Eloquent Collections 325 31 protect
- Page 342 and 343:
Eloquent Collections 327 43 public
- Page 344 and 345:
Eloquent Collections 329 Pop Pop is
- Page 346 and 347:
Eloquent Collections 331 1
- Page 348 and 349:
Eloquent Collections 333 1
- Page 350 and 351:
Eloquent Collections 335 1
- Page 352 and 353:
Eloquent Collections 337 11 string
- Page 354 and 355:
Eloquent Collections 339 1
- Page 356 and 357:
Eloquent Collections 341 1 array (s
- Page 358 and 359:
Eloquent Collections 343 1 int 6 So
- Page 360 and 361:
Eloquent Relationships It was a col
- Page 362 and 363:
Eloquent Relationships 347 Let’s
- Page 364 and 365:
Eloquent Relationships 349 1 +-----
- Page 366 and 367:
Eloquent Relationships 351 1 +-----
- Page 368 and 369:
Eloquent Relationships 353 21 }); 2
- Page 370 and 371:
Eloquent Relationships 355 1 return
- Page 372 and 373:
Eloquent Relationships 357 13 $albu
- Page 374 and 375:
Eloquent Relationships 359 1
- Page 376 and 377:
Build An App 1: Playstation Game Co
- Page 378 and 379:
Build An App 1: Playstation Game Co
- Page 380 and 381:
Build An App 1: Playstation Game Co
- Page 382 and 383:
Build An App 1: Playstation Game Co
- Page 384 and 385:
Build An App 1: Playstation Game Co
- Page 386 and 387:
Build An App 1: Playstation Game Co
- Page 388 and 389:
Build An App 1: Playstation Game Co
- Page 390 and 391:
Build An App 1: Playstation Game Co
- Page 392 and 393:
Build An App 1: Playstation Game Co
- Page 394 and 395:
Build An App 1: Playstation Game Co
- Page 396 and 397:
Build An App 1: Playstation Game Co
- Page 398 and 399:
Build An App 1: Playstation Game Co