panique / mini3

Just an extremely simple naked PHP application, useful for small projects and quick prototypes.
274 stars 100 forks source link

♻️: Refactoring the <view> function #64

Closed iamrafaelmelo closed 3 years ago

iamrafaelmelo commented 3 years ago

Refactoring of the function to a simpler code, allowing the removal of the file extension from the view in the controllers.

Usage

Before:

public function index()
{
    view('_templates/header.php');
    view('home/index.php');
    view('_templates/footer.php');
}

After:

public function index()
{
    view('_templates/header');
    view('home/index');
    view('_templates/footer');
}