Closed chrisiek closed 7 years ago
I have added a more detailed explanation to the Plugins README file.
Are you still unsure as to where to put this line?
The code is correct and your additional explanation was a real help because I realized that I didn't give a chance the code to finish execution of code and execute the closure by inserting dd("stopped here");
at the very end. I shouldn't have inserted this line at the end like this.
$api->version('v1', ['prefix' => 'api'], function ($api) {
trace_log("1");
$api->get('home', function () {
trace_log('Got here.');
return ['now' => microtime()];
});
});
dd("stopped here"); // remove a line like this
When I run http://developer.dev/api/home I don't get 'Got here.' Only prints 1 in the log.
The API_PREFIX is also set to 'api' .
This is my code:
Any idea what's going on?
The fact is that I didn't know how to implement the mentioned
line. It surely needs some more explanation.