-
Notifications
You must be signed in to change notification settings - Fork 5
Quickstart
Create a new project using Garp Scaffold.
Or git clone
an existing one.
Run composer install
to grab all dependencies.
Create a UTF-8 MySQL database and call it project name + "_d". The name has to match the setting in /application/configs/db.ini
:
[development]
...
resources.db.params.dbname = my_project_name_d
In your MySQL client, allow the Garp database user access to the database.
- User:
garp_development
- Pass:
welovegarp
Prepare the CDN. Make sure your asset files are distributed to S3:
$ g cdn distribute --to=development
Create some controller actions. If you're creating a new controller, make sure to add it to /application/configs/acl.ini
as well. See ACL for more on that.
Make sure the url you're trying out is mentioned in /application/configs/routes.ini
You'll need a view to render a template. Within /application/modules/default/views/scripts/
there should be a folder per controller. Inside should be a .phtml file, bearing the name of the controller action.
Create some snippets in /application/configs/snippets.ini
and call the snippet generator:
$ g snippet create from file
Spawn your models.
Set the necessary image scaling templates in /application/configs/assets.ini
, in the same fashion as the cms_list
and cms_preview
templates already defined. After clearing your cache, you can use the scaling template when rendering an image in a view:
$this->image()->render($datatype->image_id, 'my_scaling_template');