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
2553e9a0
Commit
2553e9a0
authored
May 28, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue #439
parent
f690f0db
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
27 deletions
+24
-27
README.md
apps/advanced/README.md
+14
-14
main.php
apps/advanced/backstage/config/main.php
+1
-1
composer.json
apps/advanced/composer.json
+0
-3
main.php
apps/advanced/console/config/main.php
+1
-1
main.php
apps/advanced/frontend/config/main.php
+1
-1
init
apps/advanced/init
+7
-7
init.bat
apps/advanced/init.bat
+0
-0
No files found.
apps/advanced/README.md
View file @
2553e9a0
...
...
@@ -67,32 +67,32 @@ If you do not have [Composer](http://getcomposer.org/), you may download it from
curl -s http://getcomposer.org/installer | php
~~~
You can then install the
Bootstrap A
pplication using the following command:
You can then install the
a
pplication using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-advanced yii-advanced
~~~
Now you should be able to access:
-
the frontend using the URL
`http://localhost/yii-advanced/frontend/www/`
-
the backstage using the URL
`http://localhost/yii-advanced/backstage/www/`
assuming
`yii-advanced`
is directly under the document root of your Web server.
### Install from an Archive File
This is not currently available. We will provide it when Yii 2 is formally released.
GETTING STARTED
---------------
After
template application and its dependencies are downloaded you need to initialize it and set some config values to
match your application requirements
.
After
you install the application, you have to conduct the following steps to initialize
the installed application. You only need to do these once for all
.
1.
Execute
`install`
command selecting
`dev`
as environment.
2.
Set
`id`
value in
`console/config/main.php`
,
`frontend/config/main.php`
,
`backstage/config/main.php`
.
3.
Create new database. It is assumed that MySQL InnoDB is used. If not, adjust
`console/migrations/m130524_201442_init.php`
.
4.
In
`common/config/params.php`
set your database details in
`components.db`
values.
1.
Execute the
`init`
command and select
`dev`
as environment.
2.
Create a new database. It is assumed that MySQL InnoDB is used. If not, adjust
`console/migrations/m130524_201442_init.php`
.
3.
In
`common/config/params.php`
set your database details in
`components.db`
values.
Now you should be able to access:
-
the frontend using the URL
`http://localhost/yii-advanced/frontend/www/`
-
the backstage using the URL
`http://localhost/yii-advanced/backstage/www/`
assuming
`yii-advanced`
is directly under the document root of your Web server.
apps/advanced/backstage/config/main.php
View file @
2553e9a0
...
...
@@ -9,7 +9,7 @@ $params = array_merge(
);
return
array
(
'id'
=>
'
change-me
'
,
'id'
=>
'
app-backend
'
,
'basePath'
=>
dirname
(
__DIR__
),
'vendorPath'
=>
dirname
(
dirname
(
__DIR__
))
.
'/vendor'
,
'preload'
=>
array
(
'log'
),
...
...
apps/advanced/composer.json
View file @
2553e9a0
...
...
@@ -36,9 +36,6 @@
"frontend/runtime"
,
"frontend/www/assets"
],
"yii-install-executable"
:
[
"yii"
]
}
}
apps/advanced/console/config/main.php
View file @
2553e9a0
...
...
@@ -9,7 +9,7 @@ $params = array_merge(
);
return
array
(
'id'
=>
'
change-m
e'
,
'id'
=>
'
app-consol
e'
,
'basePath'
=>
dirname
(
__DIR__
),
'vendorPath'
=>
dirname
(
dirname
(
__DIR__
))
.
'/vendor'
,
'preload'
=>
array
(
'log'
),
...
...
apps/advanced/frontend/config/main.php
View file @
2553e9a0
...
...
@@ -9,7 +9,7 @@ $params = array_merge(
);
return
array
(
'id'
=>
'
change-me
'
,
'id'
=>
'
app-frontend
'
,
'basePath'
=>
dirname
(
__DIR__
),
'vendorPath'
=>
dirname
(
dirname
(
__DIR__
))
.
'/vendor'
,
'preload'
=>
array
(
'log'
),
...
...
apps/advanced/in
stall
→
apps/advanced/in
it
View file @
2553e9a0
...
...
@@ -4,27 +4,27 @@ $root = str_replace('\\', '/', __DIR__);
$envs
=
require
(
"
$root
/environments/index.php"
);
$envNames
=
array_keys
(
$envs
);
echo
"Yii Application In
stallation
Tool v1.0
\n\n
"
;
echo
"Which environment do you want t
o install the application to
?
\n\n
"
;
echo
"Yii Application In
it
Tool v1.0
\n\n
"
;
echo
"Which environment do you want t
he application to be initialized in
?
\n\n
"
;
foreach
(
$envNames
as
$i
=>
$name
)
{
echo
" [
$i
]
$name
\n
"
;
}
echo
"
\n
Your choice [0-"
.
(
count
(
$envs
)
-
1
)
.
', or "q" to quit] '
;
$answer
=
trim
(
fgets
(
STDIN
));
if
(
!
ctype_digit
(
$answer
)
||
!
isset
(
$envNames
[
$answer
]))
{
echo
"
\n
Quit in
stall
ation.
\n
"
;
echo
"
\n
Quit in
itializ
ation.
\n
"
;
return
;
}
$env
=
$envs
[
$envNames
[
$answer
]];
echo
"
\n
In
stall
the application under '
{
$envNames
[
$answer
]
}
' environment? [yes|no] "
;
echo
"
\n
In
itialize
the application under '
{
$envNames
[
$answer
]
}
' environment? [yes|no] "
;
$answer
=
trim
(
fgets
(
STDIN
));
if
(
strncasecmp
(
$answer
,
'y'
,
1
))
{
echo
"
\n
Quit in
stall
ation.
\n
"
;
echo
"
\n
Quit in
itializ
ation.
\n
"
;
return
;
}
echo
"
\n
Start in
stall
ation ...
\n\n
"
;
echo
"
\n
Start in
itializ
ation ...
\n\n
"
;
$files
=
getFileList
(
"
$root
/environments/
{
$env
[
'path'
]
}
"
);
$all
=
false
;
foreach
(
$files
as
$file
)
{
...
...
@@ -47,7 +47,7 @@ if (isset($env['executable'])) {
}
}
echo
"
\n
... in
stall
ation completed.
\n\n
"
;
echo
"
\n
... in
itializ
ation completed.
\n\n
"
;
function
getFileList
(
$root
,
$basePath
=
''
)
{
...
...
apps/advanced/in
stall
.bat
→
apps/advanced/in
it
.bat
View file @
2553e9a0
File moved
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