installing laravel app on addon domain with shared hosting

I've searched up and down and while there are a lot of the same solutions out there that show how to do this, none of them seem to be working (surely, I having something configured wrong here).

I've searched up and down and while there are a lot of the same solutions out there that show how to do this, none of them seem to be working (surely, I having something configured wrong here).

I am trying to deploy a laravel app on an addon domain with shared hosting.

I have uploaded my app (all but the public folder) along side the public_html folder (same level, not inside it).

Structure: https://imgur.com/a/fiyGxzC

I've taken everything from the public folder and put it inside a folder on the addon domain.

Ex.: public_html/mysite.com/laravel/

Note that I've substituted my actual username and domain with placeholders here (obviously)

This is where it gets tricky for me. I've tried adjusting the paths in the public_html/mysite.com/laravel/index.php file, but the DIR method/command seems to be grabbing from the wrong directory and I get the following errors:

Warning: require(/home1/username/public_html/mysite.com/laravel/../../laravelapp/bootstrap/autoload.php): failed to open stream: No such file or directory in /home1/username/public_html/mysite.com/laravel/index.php on line 22

Warning: require(/home1/username/public_html/mysite.com/laravel/../../laravelapp/bootstrap/autoload.php): failed to open stream: No such file or directory in /home1/username/public_html/mysite.com/laravel/index.php on line 22

Fatal error: require(): Failed opening required '/home1/username/public_html/mysite.com/laravel/../../laravelapp/bootstrap/autoload.php' (include_path='.:/opt/php71/lib/php') in /home1/username/public_html/mysite.com/laravel/index.php on line 22

Do note that I've tried modifying to document root by trying it with a subdomain, but ran into the same type of errors.

Also note that when I put the entire app (including public) inside a folder inside the addon domain (ex.: mysite.com/testing), I was able to get things working, but the images and styles would not load. I know this is a security risk, so I'm trying to do it the correct way now and get everything running smoothly.

Some help here would be greatly appreciated - been on this for 2 days now. Thanks a lot! Sorry for any redundancy here.

Edit: I've also tried modifying my path in the server.php (this was suggested on another solution) to "../public_html/mysite.com/laravel/index.php" and to no avail as well.

Clear Cache in Laravel 6.8 App using Artisan Command Interface (CLI)

Clear Cache in Laravel 6.8 App using Artisan Command Interface (CLI)

In Laravel 6 tutorial, we learn how to use PHP artisan command interface (CLI) to clear the cache from Laravel 6.8 application. How To Clear Cache in Laravel 6.8 Application using Artisan Command Line Interface (CLI)? How to clear route cache using php artisan command? How to easily clear cache in Laravel application? How to clear config cache in PHP Laravel via artisan command? How to clear Laravel view cache? How to Reoptimized class in Laravel via artisan CLI?

Today in this tutorial, we are going to learn how to clear route cache, laravel application cache, config cache, view cache and reoptimized class in a Laravel 6.8 application using artisan command-line interface.

I’m pretty sure many of you may have found yourself gotten into the situation where you do not see changes in the view after making the changes in the app.

Laravel application serves the cached data so caching problem occurs due to the robust cache mechanism of Laravel.

But, if you are still facing this issue, then you do not have to worry further. Let me do the honour of introducing you some of the best artisan commands to remove the cache from your Laravel app via PHP artisan command line interface.

Artisan is the command-line interface included with Laravel. It provides a number of helpful commands that can assist you while you build your application.

Table of Contents

  • Clear Route Cache in Laravel
  • Clear Laravel Application Cache
  • Clear Config Cache via PHP Artisan
  • Clear Laravel View Cache
  • Reoptimized Class
Clear Route Cache in Laravel

Laravel caching system also takes routes in consideration, to remove route cache in Laravel use the given below command:

php artisan route:cache
Clear Application Cache in Laravel

Run the following command to clear application cache:

php artisan cache:clear
Clear Config Cache in Laravel

Run the following command to clear config cache:

php artisan config:cache
Clear View Cache in Laravel

Run the following command to clean your view cache:

php artisan view:clear
Reoptimize Class

Run the below command to reoptimize the class loader:

php artisan optimize

Conclusion

We have completed this Laravel 6 tutorial, In this tutorial we learned how to use php artisan command to clear the cache from your Laravel application. We have answered the following questions in this article.

  • How to clear route cache using php artisan command?
  • How to easily clear cache in Laravel application?
  • How to clear config cache in PHP Laravel via artisan command?
  • How to clear Laravel view cache?
  • How to Reoptimized class in Laravel via artisan CLI?

Now, it’s your time to let me know what do you think about this laravel 6 article. Go forth and try these super awesome artisan commands and let me know how these commands are helping you.

Get Weather Data with Laravel Weather

Get Weather Data with Laravel Weather

Get Weather Data with Laravel Weather. Laravel Weather is a good package which we can use to get weather data. It's a wrapper around Open Weather Map API (Current weather). A wrapper around Open Weather Map API (Current weather)

🌤️ A wrapper around Open Weather Map API (Current weather)

Installation

You can install the package via composer:

source-shell
composer require gnahotelsolutions/laravel-weather
Usage
text-html-php
$weather = new Weather();

// Checking weather by city name
$currentWeatherInGirona = $weather->get('girona,es');

// You can use the city id, this will get you unambiguous results
$currentWeatherInGirona = $weather->find('3121456');

Units

By default the package uses metric for Celsius temperature results, this can be modified using the configuration file or on the fly:

text-html-php
$weather = new Weather();

$currentWeatherInGirona = $weather->inUnits('imperial')->get('girona,es');

Language

By default the package uses es for the description translation, this can be modified using the configuration file or on the fly:

text-html-php
$weather = new Weather();

$currentWeatherInGirona = $weather->inLanguage('en')->get('girona');

Guzzle Client Instance

If you need to use another instance of Guzzle, to modify headers for example:

text-html-php
$weather = new Weather();

$guzzle = $this->getSpecialGuzzleClient();

$currentWeatherInGirona = $weather->using($guzzle)->get('girona');

Testing

source-shell
composer test

Laravel Sweet Alert | How to use the SweetAlert package in Laravel PHP

Laravel Sweet Alert | How to use the SweetAlert package in Laravel PHP

Sweet Alert is a laravel wrapper around #sweetalert javascript library for showing alert or notification message. This is a great package created by rashid, and this laravel package is very famous because it has tonnes of features you can choose from.

Sweet Alert is a laravel wrapper around #sweetalert javascript library for showing alert or notification message.

This is a great package created by rashid, and this laravel package is very famous because it has tonnes of features you can choose from.