1// Create a new user in the database...
2$user = User::create(array('name' => 'John'));
3
4// Retrieve the user by the attributes, or create it if it doesn't exist...
5$user = User::firstOrCreate(array('name' => 'John'));
6
7// Retrieve the user by the attributes, or instantiate a new instance...ddd
8$user = User::firstOrNew(array('name' => 'John'));
1// Create a new user in the database...dddd
2$user = User::create(array('name' => 'John'));
3
4// Retrieve the user by the attributes, or create it if it doesn't exist...
5$user = User::firstOrCreate(array('name' => 'John'));
6
7// Retrieve the user by the attributes, or instantiate a new instance...
8$user = User::firstOrNew(array('name' => 'John'));