Please enable JavaScript.
Coggle requires JavaScript to display documents.
php - Coggle Diagram
php
TDD
store new data
is stored to db
$this->assertDatabase()
redirect
assertRedirect()
validation
assertSessionHasErrors()
Factory
operations
create()
make()
obj
raw()
array
can override
factory('App\Project')
RefreshDatabase
clear db after each test
testXYZ
method name
seperate test db & real db
how
phpunit.xml
DB_CONNECTION
sqlite
DB_DATABASE
:memory:
withoutExceptionHandling
see errors at server side
MVC
Controller
methods
store
create new item
index
all items
show
view single item
data from request
request([ ... ])
validate
request()->validate()
required
middleware
auth
Model
mass assignment
guarded
fillable
operations
create
persist to db
all
View
pass data
compact
with
traits
use ...
Migrations
types
string
varchar
has length
text
no length
pointer
slower vs string
foreign
ref
on
owner_id
unsignedInteger !?!
import
use App..;
PHP
array vs obj
array
arr['key']
obj
obj->attr