I have developed a news website project using laravel 8x for one domain(main domain) Can I use the same project in subdomain? Main domain project frontend will Bangla language and the subdomain project frontend will English. Is it possible? or do I have to install new Laravel apps for the subdomain project?
Also, database will be different.
Hi There of course you cant use different databases for same Laravel Project unless you make separate installation for each domain and its subdomain.
Indeed You can use localization in Laravel so you will not have to install 2 copies for the same app
More details about localization here : https://laravel.com/docs/8.x/localization
I don't like to modify the functioning of any of the code for example.com . After the setup
the objective is to use one instance of Laravel and have the domain/database structure of the image below and the following user interface pages.
info1.example.com
info2.example.com
info3.example.com
these all are run from example.com. Like example.com main domain run info1.example.com, and other's also run different address from example.com. how can i do that?
I have a laravel instance on a domain:
laravel-instance.com
I want to be able to run another application on the same domain:
laravel-instance.com/app2
app2 is a vanilla php app, but laravel is blocking the app. Is there a way that I can create an htaccess rule or tell laravel to ignore /app2?
In my website, I want to update data from external source everyday.
I create an administration module and he works manually but I need automate the process.
I think a cron can do that but the problem is the login ?
Joomla 3.
Set up the cronjob on the joomla server needs no login. Login is only needed via Http Requests, A cron job on the server dosent need a login (cron job on same server with joomla)
But as module it will not work. Why just hit a php script as cronjob?
A module needs joomla rendering in most cases and this will not work!
I wrote a custom component in Joomla! that pulls in content from an XML feed and stores it in the Joomla database. I want the admin URL (/administrator/index?option=com_mycomp) to run via cron once every night to run the component. I can't figure out how to make this work, though, since the component is an administrator task and you have to be logged in to run it.
How do I get by this? I tried including my user/pw in the url (http:admin:password#www.mysite.com/joomla/administrator....) but it doesn't work. Is there anyway other way to send login credentials, or any other way to do this?
I know this thread is very old, but here's how I handled a similar task.
The "trick" is to take the custom PHP code you have created, and embed it into an article within your Joomla website.
I did this by using the JUMI extension, that allows custom PHP code to be stored within the Joomla repository and embedded, as required, within an article.
Then, create a CRON task that will activate the appropriate URL for the page containing the code you want to run.
Just put your script in the administrator directory of the component like
/administrator/components/com_yourcomponent/cron.yourcomponent.php
This is how FeedGator handles cron tasks [Sounds very similar to what you're trying to do.] ... you can also write a frontend controller in your component per one of the comments
========== [Update] ============
I created this ultra-simple installable component that could also be used for this purpose. It allows for a frontend menu item to be assigned to a php page (including the route as suggested). So you:
install the component
create new menu item, (may want to use a 'hidden' menu) select the 'show' view option and enter the script to run via cron in 'file to include' like path/yourcron.php
call the 'page' in your cron or test using: yourjoomlasite.com/index.php?option=com_show or yourjoomlasite.com/your-menu-alias
Mostly corn urls works from front-end even if your component deals with administrator only in Joomla.
So whatever your code in admin cron get it to front-end & so that your cronurl becomes like index.php?option=com_yourcomponent&task=cronjob.
Use this url to set cron using cPanel.
However this solution doesn't need to see whether admin is logged or not.