Skip to content
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

Lumen support #37

Closed
One-art opened this issue Oct 7, 2016 · 3 comments
Closed

Lumen support #37

One-art opened this issue Oct 7, 2016 · 3 comments

Comments

@One-art
Copy link

One-art commented Oct 7, 2016

I've try install v3.0.6 on lumen 5.2 with no luck.

After adding this line in file: /bootstrap/app.php
$app->register(Laratrust\LaratrustServiceProvider::class);

I got a error:

[ErrorException]
  Argument 1 passed to Laratrust\LaratrustServiceProvider::boot() must be an instance of Illuminate\View\Factory, none given, called in /usr/local/www/apache24/data/cartrade/backend/vendor/
  laravel/lumen-framework/src/Application.php on line 173 and defined

I also try to instal dev branch but have composer error

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for santigarcor/laratrust dev-master -> satisfiable by santigarcor/laratrust[dev-master].
    - Conclusion: remove illuminate/cache v5.2.45
    - Conclusion: don't install illuminate/cache v5.2.45
    - santigarcor/laratrust dev-master requires illuminate/cache ~5.1.0 -> satisfiable by illuminate/cache[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8].
    - Can only install one of: illuminate/cache[v5.1.1, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.13, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.16, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.2, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.20, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.22, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.25, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.28, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.30, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.31, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.41, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.6, v5.2.45].
    - Can only install one of: illuminate/cache[v5.1.8, v5.2.45].
    - Installation request for illuminate/cache (locked at v5.2.45, required as ~5.1) -> satisfiable by illuminate/cache[v5.2.45].

I'm pretty noob in Laravel family btw.

@One-art
Copy link
Author

One-art commented Oct 7, 2016

So, I have create LaratrustLumenServiceProvider.php in app/providers/ and copy original file.
Change code:
46: public function boot(Factory $view)
to
46: public function boot()

Also fix paths from __DIR__ to variable __DIR__.'/../../vendor/santigarcor/laratrust/src/Laratrust'
and fix namespaces.
Now it seems to be work. I'll write results after full test.

@santigarcor
Copy link
Owner

I'll have to check that.

@santigarcor
Copy link
Owner

0be6f36 solves it, i'll tag this commit soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants