Closed icubed-web closed 9 years ago
Yes it should work. It depends on illuminate/database
and illuminate/contracts
.
The only thing that you need to do for sure, is setting up the factories, just like in the service provider:
public function boot()
{
Builder::setJoinerFactory(new JoinerFactory);
Builder::setParserFactory(new ParserFactory);
}
Thank you ,
I really appreciate your response .
Hi ,
Im having some issues using eloquence , im getting this error :
Call to a member function make() on null
I know you said that I should set up factories , so how would you exactly do that ?
Thanking you in advance .
@icubed-web You should do that before using Eloquent. The best will be when your app is bootstrapping - that's what Laravel's ServiceProviders
do. Now, I don't know about slim, but there must be some kind of similar process, so this will be it.
Hi jarek ,
Thank you for your help ,
I did manage to boot eloquence like so ...
use Sofa\Eloquence\ServiceProvider as Eloquence;
$test = new Eloquence;
$test->boot();
but I am getting an issue ?
Missing argument 1 for Illuminate\Support\ServiceProvider::__construct(),
Dont know what I should be calling ....
And thank you for your time , thank you for helping me out .
I really do appreciate it .
Hi jarek ,
I would really love to thank you for all your help and for this great repository ,
I have finally got it to work and it was as simple pie ...
here is my code and thank you again .
use Illuminate\Support\ServiceProvider as Provider;
use Sofa\Eloquence\ServiceProvider as Eloquence;
$test = new Eloquence('Sofa\Eloquence\ServiceProvider');
$test->boot();
Best Regards
Hi , would it be possible to use outside of laravel ? Im using slim with eloquent .
Thanking your in advance .