When comparing Phalcon vs Laravel 5, the Slant community recommends Laravel 5 for most people. In the question“What are the best backend web frameworks?” Laravel 5 is ranked 6th while Phalcon is ranked 7th. The most important reason people chose Laravel 5 is:
Laravel comes out of the box with it's own CLI called Artisan. With Artisan developers can do several different tasks such as migrating databases, seeding databases, clearing the cache and much much more.
In Phalcon:
$comment = new Comment();
$comment->assign(array('message' => 'A new comment.'));
$post = Post::findFirst(1);
$post->comments = $comment;
$post->save();
or
$post = Post::findFirst(1);
$comment = new Comment();
$comment->post = $post;
$comment->save(array('message' => 'A new comment.'));
or
$comment = new Comment();
$comment->setMessage('A new comment.')->post = Post::findFirst(1);
$comment->save();
There may be some shorter (and less readable than Laravel) approach because I am beginner only. Phalcon is first framework in my "career". I don't know others.
Still, if this is the only concern of your colleague, tell him that your post made me 100% sure that Phalcon was the best choice.
0 comments:
Post a Comment