Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e4963f50
Commit
e4963f50
authored
Jan 19, 2014
by
Alexander Kochetov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guide updated
parent
7d157abd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
active-record.md
docs/guide/active-record.md
+1
-1
behaviors.md
docs/guide/behaviors.md
+2
-2
model.md
docs/guide/model.md
+1
-1
No files found.
docs/guide/active-record.md
View file @
e4963f50
...
...
@@ -413,7 +413,7 @@ and you may also join with sub-relations. For example,
$orders
=
Order
::
find
()
->
innerJoinWith
([
'books'
,
'customer'
=>
function
(
$query
)
{
$query
->
where
(
'tbl_customer.create
_time
> '
.
(
time
()
-
24
*
3600
));
$query
->
where
(
'tbl_customer.create
d_at
> '
.
(
time
()
-
24
*
3600
));
}
])
->
all
();
// join with sub-relations: join with books and books' authors
...
...
docs/guide/behaviors.md
View file @
e4963f50
...
...
@@ -23,8 +23,8 @@ class User extends ActiveRecord
'timestamp'
=>
[
'class'
=>
'yii\behaviors\AutoTimestamp'
,
'attributes'
=>
[
ActiveRecord
::
EVENT_BEFORE_INSERT
=>
[
'create
_time'
,
'update_time
'
],
ActiveRecord
::
EVENT_BEFORE_UPDATE
=>
'update
_time
'
,
ActiveRecord
::
EVENT_BEFORE_INSERT
=>
[
'create
d_at'
,
'updated_at
'
],
ActiveRecord
::
EVENT_BEFORE_UPDATE
=>
'update
d_at
'
,
],
],
];
...
...
docs/guide/model.md
View file @
e4963f50
...
...
@@ -238,7 +238,7 @@ Using the same `attributes` property you can massively assign data from associat
```
php
$attributes
=
[
'title'
=>
'Model attributes'
,
'create
_time
'
=>
time
(),
'create
d_at
'
=>
time
(),
];
$post
->
attributes
=
$attributes
;
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment