$newUser = new User(); $newUser->setName('John Doe'); $newUser->setEmail('johndoe@example.com'); $newUser->save();
$user = UserQuery::create() ->filterByStatus(User::ACTIVE) ->orderByCreatedAt('desc') ->findOne(); echo $user->getName(); echo $user->getEmail();This code queries the User table for an active user with the most recent creation date and retrieves their name and email fields. Package Library: Propel is available as a standalone package that can be installed using Composer, but it is also included in many popular PHP frameworks such as Symfony, Laravel, and Yii. Therefore, it can be grouped both as a standalone package library and as a framework library.