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

Support resource route when function with subdirectory. #344

Merged
merged 2 commits into from Jan 4, 2017

Conversation

wuzheng40
Copy link
Contributor

In my project, I nedd to implement a new resource api with subdirectory.
I failed use default function to do it. So I modify it.

Support resource route when function with subdirectory.
example: $routes->resource('Admin/Admins');

example: $routes->resource('Admin/Admins');
@lonnieezell
Copy link
Member

Looks good. Can you add a test for this to the RouterTest class?

@wuzheng40
Copy link
Contributor Author

Hi, @lonnieezell
When I run phpunit, it report Fatal error: Default value for parameters with a class type hint can only be NULL in C:\Tools\Wnmp\html\UT\system\Config\DotEnv.php on line 121.
Many developers meet this issure when their php version is lower than 7.
But my version is 7.0.8 .
untitled

@takekoshinet
Copy link
Contributor

check php -v on command line.
probably php versions are different between cli and web.

@takekoshinet
Copy link
Contributor

my phpunit is passed.
php 7.0.0 on fedora25.

example: $routes->resource('Admin/Admins');
@wuzheng40
Copy link
Contributor Author

@noldor Thank you, My cli is 5.6.18, After update, it's work now.
@lonnieezell Hi, Test has been updated.

@lonnieezell lonnieezell merged commit 296b4bb into codeigniter4:develop Jan 4, 2017
@lonnieezell
Copy link
Member

Great. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants