app/models/User.php
//create new user using $data array
create new user using $data array
create new user using $data array
static public function createUser($data)
	{
		try
		{
			$user = new User();
			$user->name = $data['name'];
			$user->surname = $data['surname'];
			$user->email = $data['email'];
			$user->password = Hash::make($data['password']);
		}
		catch(Exception $e)
		{
			return $e;
		}
		return $user;
	}
static public function createUser ( $ data ) { try { $ user = new User ( ) ; $ user -> name = $ data [ 'name' ] ; $ user -> surname = $ data [ 'surname' ] ; $ user -> email = $ data [ 'email' ] ; $ user -> password = Hash :: make ( $ data [ 'password' ] ) ; } catch ( Exception $ e ) { return $ e ; } return $ user ; }
create new user using $data array
create new user using $data array