Commit bb6147e1d4229c96442194607dfb254ae6ff336d
1 parent
ee392fef
registration
Showing
1 changed file
with
12 additions
and
2 deletions
Show diff stats
app/library/App/Controllers/UserController.php
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | namespace App\Controllers; |
4 | 4 | |
5 | +use App\Model\Project; | |
5 | 6 | use App\Model\User; |
6 | 7 | use PhalconRest\Mvc\Controllers\CrudResourceController; |
7 | 8 | |
... | ... | @@ -57,12 +58,21 @@ class UserController extends CrudResourceController |
57 | 58 | $data = $this->transformPostData($data); |
58 | 59 | |
59 | 60 | $item = $this->createModelInstance(); |
60 | - $user = new User(); | |
61 | + | |
62 | + /** ****************************/ | |
63 | + $user = new User(); | |
61 | 64 | $user->username = 'test33233222'; |
62 | 65 | $user->save(); |
63 | - echo 2424; | |
66 | + echo $user->id; | |
67 | + | |
68 | + $project = new Project(); | |
69 | + $project->name = 'test33233222'; | |
70 | + $project->save(); | |
71 | + echo $project->id; | |
64 | 72 | die(); |
65 | 73 | |
74 | + /** **********************/ | |
75 | + | |
66 | 76 | |
67 | 77 | $newItem = $this->createItem($item, $data); |
68 | 78 | ... | ... |