1010- [ Laravel Asana on GitHub] ( https://github.com/torann/laravel-asana )
1111- [ Laravel 4 Installation] ( https://github.com/Torann/laravel-asana/tree/0.1.2 )
1212
13- To get the latest version of Laravel Asana simply require it in your ` composer.json ` file.
13+ ### Composer
1414
15- ~~~
16- "torann/laravel-asana": "0.2.*@dev"
17- ~~~
15+ From the command line run:
1816
19- You'll then need to run ` composer install ` to download it and have the autoloader updated.
17+ ```
18+ $ composer require torann/laravel-asana
19+ ```
20+
21+ ### Laravel
2022
2123Once installed you need to register the service provider with the application. Open up ` config/app.php ` and find the ` providers ` key.
2224
23- ``` php
24- 'providers' => array(
25- 'Torann\LaravelAsana\ServiceProvider',
26- )
25+ ``` php
26+ 'providers' => [
27+
28+ \Torann\LaravelAsana\ServiceProvider::class,
29+
30+ ]
31+ ```
32+
33+ ### Lumen
34+
35+ For Lumen register the service provider in ` bootstrap/app.php ` .
36+
37+ ``` php
38+ $app->register(\Torann\LaravelAsana\ServiceProvider::class);
2739```
2840
29- Laravel Asana also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your ` config/app.php ` file.
41+ ### Facade
42+
43+ This package also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your ` config/app.php ` file.
3044
3145``` php
32- 'aliases' => array(
46+ 'aliases' => [
3347 'Asana' => 'Torann\LaravelAsana\Facade',
34- )
48+ ]
3549```
3650
37- ### Create configuration file using artisan
51+ ### Publish the configurations
52+
53+ Run this on the command line from the root of your project:
3854
3955```
40- $ php artisan vendor:publish
56+ $ php artisan vendor:publish --provider="Torann\LaravelAsana\ServiceProvider"
4157```
4258
4359A configuration file will be publish to ` config/asana.php ` .
@@ -81,12 +97,12 @@ Asana::getSubTasks($task_id);
8197#### Creating a task
8298
8399``` php
84- Asana::createTask(array(
100+ Asana::createTask([
85101 'workspace' => '176825', // Workspace ID
86102 'name' => 'Hello World!', // Name of task
87103 'assignee' => '
[email protected] ', // Assign task to...
88- 'followers' => array( '3714136', '5900783') // We add some followers to the task... (this time by ID)
89- ) );
104+ 'followers' => [ '3714136', '5900783'] // We add some followers to the task... (this time by ID)
105+ ] );
90106```
91107
92108#### Delete a task
@@ -134,11 +150,11 @@ Asana::removeTagFromTask($task_id, $tag_id);
134150#### Create a project
135151
136152``` php
137- Asana::createProject(array(
153+ Asana::createProject([
138154 "workspace" => "1768",
139155 "name" => "Foo Project!",
140156 "notes" => "This is a test project"
141- ) );
157+ ] );
142158```
143159
144160#### Getting projects in all workspaces
@@ -158,10 +174,10 @@ Asana::getProjectsInWorkspace($workspace_id, $archived);
158174#### Updating project info
159175
160176``` php
161- Asana::updateProject($project_id, array(
177+ Asana::updateProject($project_id, [
162178 'name' => 'This is a new cool project!',
163179 'notes' => 'At first, it wasn't cool, but after this name change, it is!'
164- ) );
180+ ] );
165181```
166182
167183#### Get project tasks
@@ -225,7 +241,7 @@ Asana::getWorkspaces();
225241#### Update workspace
226242
227243``` php
228- $data = array( 'name' => '') ;
244+ $data = [ 'name' => ''] ;
229245
230246Asana::updateWorkspace($workspace_i, $data);
231247```
@@ -255,15 +271,20 @@ Asana::getWorkspaceUsers($workspace_id);
255271If you specify an assignee, you must also specify a workspace to filter on.
256272
257273``` php
258- Asana::getTasksByFilter(array(
274+ Asana::getTasksByFilter([
259275 'assignee' => 1121,
260276 'project' => 37373729,
261277 'workspace' => 111221
262- ) );
278+ ] );
263279```
264280
265281## Change Log
266282
283+ #### v0.2.1
284+
285+ - Add support for Lumen
286+ - Code cleanup
287+
267288#### v0.2.0
268289
269290- Update to Laravel 5
0 commit comments