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

Kickstart pathing issue to Flatten.php #43

Open
gritdigital-mibu opened this issue Sep 10, 2015 · 5 comments
Open

Kickstart pathing issue to Flatten.php #43

gritdigital-mibu opened this issue Sep 10, 2015 · 5 comments

Comments

@gritdigital-mibu
Copy link

The documentation for using Kickstart, the pathing appears to be wrong:

require __DIR__.'/../vendor/anahkiasen/flatten/src/Flatten/Flatten.php';
require __DIR__.'/../vendor/anahkiasen/flatten/src/Flatten.php';

@Anahkiasen
Copy link
Owner

Not sure what you mean?

@tituskeuler
Copy link

I think the problem is located in /flatten/src/Flatten.php - Line 127 ff.
The foreach-Loop will not break when it finds a valid directory, so it will end up with a non-existing directory. This minor change fixes the problem:

$storage = null;
foreach ($possible as $path) {
    if (is_dir($path)) {
      $storage = realpath($path);
      break;
  }
}

@Anahkiasen
Copy link
Owner

Ah yes I see, would you mind sending a PR to develop for this?

@gritdigital-mibu
Copy link
Author

I can't get Flatten to work at all in Laravel 5.0 - has this been tested?

As I said above, the pathing in the docs is wrong for using kickstart():
require __DIR__.'/../vendor/anahkiasen/flatten/src/Flatten/Flatten.php';

I'm just going through it now to work out what's wrong, I'll let you know if I find anything.

Cheers,

@gritdigital-mibu
Copy link
Author

The service provider seems to be fine, and the kickstart() method is looking in the right place etc, the problem seems to lie with the caching of the pages - it just doesn't seem to be caching anything.

Also, a dd() in the handle() method in FlattenMiddleware.php never gets hit and presumably this is how the L5 Flatten is now working?

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

3 participants