how to add a copyright with dynamic year?
-
How to add a copyright with dynamic year like <?php auto_copyright(); ?> I tried this command but I no have suceess.
-
Hi there,
please take a referecne from the example code.<?= "Copyright @".date("Y"); ?>
-
@sanjay-webkul said in how to add a copyright with dynamic year?:
<?= "Copyright @".date("Y"); ?>
I am to confirm the place that I need to place this command to show the world "Copyright" and the year dynamically.
I am using Bagisto Version: v1.4.3https://mydomain.com/admin/configuration/general/content
Footer
Footer text -> In this item, I add the command that you show me. All right?
If I leave this item blank it shows a default text on the site: "Powered by Bagisto, A Community Project by Webkul"
Isn't it?
But when I fill this item with the command that you show me, Nothing is shown at the footer place on the homepage...
Apart from saving the new configuration, do I need to do anything else? -
@sanjay-webkul, I checked how the command to show the copyright with the year dynamically looked on the site and it looked like this:
<div class="footer-copy-right"> <span> <!--?= "Copyright @".date("Y"); ?--> </span> </div>
-
@William-Hatanaka said in how to add a copyright with dynamic year?:
Powered by Bagisto
Hi there,
You need to change Here for the same. -
And you can take a regerence from Here
-
@sanjay-webkul, do I need to run any commands after updating the source for the change to take effect?
I ran php artisan config:clear, php artisan cache:clear, php artisan config:cache, composer dump-autoload. But nothing took effect. -
php artisan vendor:publish --all --force php artisan optimize:clear ``` And do hard refresh your webpage
-
@sanjay-webkul ,thank you! I executed the commands, but did not achieve my goal. I don't think I understood your explanation. I am sorry to bother you. I will describe what I understood.
- I update the variable copy-right at /packages/Webkul/Admin/src/Resources/lang/en/app.php#L1449 with command you gave me:
'copy-right' => '<?= "Copyright @".date("Y"); ?>'
I found it a little strange, but I did it even so.
2 . Next I put the phrase I would like in the place you gave me: https://prnt.sc/a-Nbnz7GbVYw
3. After making the updates, I executed :php artisan vendor:publish --all --force php artisan optimize:clear
and updated the webpage.
Well, as it didn't work out, I guess I didn't understand your orientation.
Please, could you explain it again? -
Hi there,
Please take a reference from Here -
@sanjay-webkul , thank you for your help. But I don't think I can express myself correctly through my level of English.I did what you showed me through the video which must have been a lot of work for you to do, thank you very much. But I wanted the year to update dynamically according to the current date. If you could explain the step by step I would be very grateful?
-
Hi @William-Hatanaka
Please change here accordingly and related files also.