You need to create an instance of the User model first, otherwise it thinks you want to search (query) your Users. which is why you're getting an error from the query builder.
$user = new User();
echo $user->exampleOne();
This was asked and answered earlier today: http://laravel.io/forum/02-25-2014-custom-methods
Thanks for you reply Andrew,
I've actually tried that before, I've also tried changing the function name but it leads me nowhere. I checked the IRC and seems like I've got double class name. But where's the other one.
Seems I got it resolved. Turns out I've got double class names
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community