Comments (3)
Can you explain more about going to /
and calling api/vi/posts
. I have not imagine the situation yet.
from active.
Route::get('/', function() {
$api = json_decode(json_encode(HMVC::get('api/v1/post')));
$posts = $api->data;
return View:make('home', compact('posts'));
});
Instead of laravel seeing the uri as / it now sees it as api/v1/posts.
Hope this explains it better I'm using guzzle & hmvc. @letrunghieu
from active.
Hi dragonfire,
I guest that you are using the teepluss/hmvc package and I have read it package source. I found that when make a call by using this package, the request
object of the application is kept but the current route
is changed and does not restored.
However, the Active package is using the current route
object instead of the request
object to make decisions for the performance purpose. If I switch to using the request
object to keep the compatibility with the HMVC
package, I have to create the route
each time a method called and I cannot use the existed route
object of the Laravel application (you can read one of my article for further infomation)
from active.
Related Issues (20)
- Watson conflict slows composer a lot HOT 3
- Active::methods need to be static? HOT 1
- why you don't update documentation and add new method ? HOT 3
- Route parameters? HOT 3
- How to handle model binding route?? HOT 2
- Feature: exclude possible routes from pattern HOT 1
- Error in documentation in - "Check the route parameter value" HOT 2
- Argument 1 passed to if_route() must be of the type array, string given HOT 3
- only return '1' if match pattern HOT 2
- Update from 2.x to 3.x HOT 1
- Missing argument 2 in ActiveServiceProvider.php line 21 with Laravel 5.3 HOT 2
- Add installation support for Laravel 5.3 HOT 2
- 建议增加 if_query_pattern HOT 1
- Laravel 5.4 support HOT 2
- When can we expect support for Laravel 5.5? HOT 2
- laravel 5.6
- Laravel 6.0 HOT 5
- Laravel 7.0 HOT 2
- change active class name
- Error when viewing 404 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active.