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

The Facade method Module::exists($slug) allways return false #47

Closed
torrentalle opened this issue Feb 23, 2015 · 2 comments
Closed

The Facade method Module::exists($slug) allways return false #47

torrentalle opened this issue Feb 23, 2015 · 2 comments
Assignees
Labels

Comments

@torrentalle
Copy link
Contributor

The Facade method Module::exists($slug) allways return false
This happens because the method don't search by slug, the method check if module exists using directory basename.
This causes that I have to search modules converting first letter to uppercase

I create a module with slug blog

vagrant@homestead:~/www/laravel5$ php artisan module:make blog
Module [Blog] has been created successfully

When I execute this code:

echo 'shoud return true, returns '.(Module::exists('blog')? 'true': 'false')."\n";
echo 'shoud return false, returns '.(Module::exists('Blog')? 'true': 'false')."\n";

I don't get the expected results:

shoud return true, returns false
shoud return false, returns true 
@kaidesu kaidesu added the Bug label Feb 23, 2015
@kaidesu kaidesu self-assigned this Feb 23, 2015
@torrentalle
Copy link
Contributor Author

thanks, quick fix!

@kaidesu
Copy link
Contributor

kaidesu commented Feb 24, 2015

That's how I roll 😎

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

No branches or pull requests

2 participants