/** * Model update() test * This method is actually never called from the blog... Just playing with the super-Models. */ public function comment($id) { echo '<pre>time() = ' . time() . "\n"; $comment = models\Comment::get($id); $update = $comment->update(array('created_on' => time())); // no placeholder stuff here! echo "Affected: "; var_dump($update); print_r($comment); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return response()->json(Comment::get()); }