Closed Luamnoxu closed 1 year ago
Hey,
you can always just use require 'file.php';
in the response function for a route if you like.
Example:
SimpleRouter::get('/page1/file', function(){
require __DIR__ . '/../../file.php';
});
~ Marius
Perfect!!! Thats exactly what I was looking for, thank you
I apologize if this has been asked before but having looked through the issues the only one i found is from 2019 with no description, replies or anything else.
How would you go about rendering a regular .php/.html file with this router? The Documentation only talks about more advanced things, which are all not really what Im looking for. (At this point Im not even sure if this router is designed to do such simple things haha)
Say for example I have /page1/file.php, how would I go about displaying it? Im aware this is Laravel inspired however I dont have Blade in my project so returning view() isn ta thing
I do apologize if I overlooked something.