We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sorry for my english... anyway:
This is my controller:
<?php namespace src\controllers; use League\Plates\Engine; use League\Plates\Extension\Asset; class Web { private $templates; public function __construct() { $this->templates = new Engine(__DIR__ . "/../views", "php"); $this->templates->loadExtension(new Asset(__DIR__ . '/../assets/', false)); // or true } public function home(): void { echo $this->templates->render("register-and-login/home", [ "title" => "Home | " . SITE, "users" => ["Adeilson", "Karol"] ]); } }
And this is in my template:
<link rel="stylesheet" href="<?= $this->asset('/css/style.css') ?>">
If I change to a non-existent path it gives an error 500, but if it is correct it defines the following path when rendering:
<link rel="stylesheet" href="/css/style.css?v=1687988335">
And this error:
GET https://mysite.com.br/css/style.css?v=1687988335 net::ERR_ABORTED 404 (Not Found)
Why? Someone can help me?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sorry for my english... anyway:
This is my controller:
And this is in my template:
<link rel="stylesheet" href="<?= $this->asset('/css/style.css') ?>">
If I change to a non-existent path it gives an error 500, but if it is correct it defines the following path when rendering:
<link rel="stylesheet" href="/css/style.css?v=1687988335">
And this error:
GET https://mysite.com.br/css/style.css?v=1687988335 net::ERR_ABORTED 404 (Not Found)
Why? Someone can help me?
The text was updated successfully, but these errors were encountered: