Closed kilrizzy closed 10 years ago
kilrizzy, thanks for your input.
There are some shortcuts, tips and tricks in Laravel world. I use one of them in my packages that makes unnecessary to add the aliases in config/app.php. The aliases declaration is inside my packages, so whenever they are called, the aliases are loaded and available for using. You really just need to add the ServiceProvider line in order to make them work.
I will correct the example provided.
This package is just a wrap around latest the Force.com Toolkit. All methods available there, are available in my package under a Laravel 4 syntax convention. Even the order of parameters in methods are the same.
Thanks again for your input, and feel free to make suggestions.
Thanks for the help. Perhaps I'm doing something wrong then but even with my service provider set and config updated I'm still getting "Class 'Salesforce' not found" using the same /test routing example
Though I was able to see the exact naming in your Service Provider and setting it manually in app.php "'Salesforce' => 'Davispeixoto\LaravelSalesforce\Facades\Salesforce'" worked. Strange
Really strange, because I'm using this in a local project and getting success...
Does your IDE adding the "use" directive in your routes file? If yes, this may be the problem.
However, I will double check this in a fresh install at home and reply. Thx again for sharing.
No problem, I'm just using SublimeText so I don't believe it's automatically adding anything extra than it should be. I'm in Laravel4.1, not sure if there were any changes from 4.0 that might have sparked an issue. Possibly unrelated but when I tried Salesforce::query(...) I ran into:
Interface 'Davispeixoto\ForceDotComToolkitForPhp\Iterator' not found
on the QueryResult class. Again, probably just user error but wanted to give you a heads up. I think I'm going to run through Force.com toolkit directly and see if I can bypass any of this. Like I mentioned still a newbie so might just be something with my setup / environment
After some work hereI could not find why Laravel can't load the Salesforce class in a fresh install.
This is a real issue. I'm reopening it and will work on it as I can.
I will update whenever I make any progress.
Todd,
the Iterator issue is really quick to fix.
It is in the underlying project I made... I will update it in a couple hours.
On Mon, Apr 14, 2014 at 11:45 AM, Todd notifications@github.com wrote:
I am also running into this issue Interface 'Davispeixoto\ForceDotComToolkitForPhp\Iterator' not found when using query. I have a big salesforce project to do so im sure i'll be annoying you a lot. I'll try to fix what i can on my own and post the fixes though.
— Reply to this email directly or view it on GitHubhttps://github.com/davispeixoto/Laravel-4-Salesforce/issues/2#issuecomment-40373697 .
Um abraço, Perdigão.
Wonderful! thanks so much. And thanks for the quick responses.
No problem guys...
The unique problem is I'm in the business time right now, this is why I can't work on it immediately, hehe.
On Mon, Apr 14, 2014 at 11:50 AM, Todd notifications@github.com wrote:
Wonderful! thanks so much. And thanks for the quick responses.
— Reply to this email directly or view it on GitHubhttps://github.com/davispeixoto/Laravel-4-Salesforce/issues/2#issuecomment-40374208 .
Um abraço, Perdigão.
HA! i wont tell :)
It's fixed already along with alias autoload bug.
There is no need to add the aliases now.
Thx for your report. Enjoy.
Jeff/Todd,
can you provide feedback on this issue about the fix I've pushed yes'day?
It would be valuable to all community.
Thank you.
On Mon, Apr 14, 2014 at 11:55 AM, Todd notifications@github.com wrote:
HA! i wont tell :)
— Reply to this email directly or view it on GitHubhttps://github.com/davispeixoto/Laravel-4-Salesforce/issues/2#issuecomment-40374926 .
Um abraço, Perdigão.
Noticed it wasn't mentioned in the docs what to add to the aliases in app.php. Still new to Laravel so was trying a few out with no success:
'Salesforce' => 'Davispeixoto\LaravelSalesforce\Facades', 'Salesforce' => 'LaravelSalesforce\Facades',
Wasn't sure what you're using but it would be a huge help so I can try this package out. Also noticed the example in the docs just needs an additional close parenthesis:
echo print_r(Salesforce::describeLayout('Account'));