-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arg 2 to Illuminate\Foundation\Application::make() must be of the type array, object given #94
Comments
+1 |
Upon going through the error some more I've narrowed down the issue to this segment of code within public static function getProxy()
{
if (!static::$__es_proxy)
{
$instance = new static;
if ($instance instanceof Model)
{
static::$__es_proxy = App::make('iverberk.larasearch.proxy', $instance);
return static::$__es_proxy;
} else
{
throw new \Exception("This trait can ony be used in Eloquent models.");
}
}
return static::$__es_proxy;
} It seems the part |
This was an old bug, since the owner is not responding at all, i have created a fork and fixed it. |
@lmahesh5, I try using your fork with "repositories" in my composer without success because you make your correction in dev-master and not in L5 branch :) @pfeiferchristopher, your fork is ok (L5 branch is used) @lmahesh5 @pfeiferchristopher, I still have un bug when trying to reindex :
Any idea ? |
@pierrerigal If you are using a single table for indexing, then just "php artisan larasearch:reindex App\Models\index_model_name" is enough. But if you are using multiple tables (join) for indexing, then only that -- relations should be used, though i didnt tried it. My assumption based on the error it expects some parameters additionally for the --relations option (may be relative table names) |
I have the same error, i'm on Laravel 5.1
|
Hi, i've got the same problem. I'm on Laravel 5.1
@pierrerigal, Did you figure it out? Edit: I got it. It was missing the --write-config option. |
Having the same issue. Somebody wants to make a PR for this? |
This is a nice package, however the author should really update it to Laravel 5.1 or merge the PRs. Anyone wanna submit their L5.1 fork to packagist, otherwise? Thanking you... Oh, just using the fork for the time being. Composer is really helpful. |
+1 |
I encountered this error when attempting to run
php artisan larasearch:reindex --dir=app/Models
but I didn't encounter any errors when runningphp artisan larasearch:paths --dir=app/Models
. I looked at the files in question between Laravelv5.0
andv5.1
and didn't see any differences that could cause the issue and I have another app running Laravelv5.0
with no issues.Any ideas @iverberk?
The text was updated successfully, but these errors were encountered: