Search code examples
laravelpathconsolelaravel-5.5

Laravel 5.5.44 project which is downloaded from the server for more developments


I have downloaded a Laravel 5.5.44 project from the c panel for further developments. When uploading this project before few months ago the person who had uploaded had been taken files from the public folder into c panel's public html folder. So that after I downloaded the project and I have create a folder named ``public and moved all required files from c panel public html folder.Also i have changed index.php as follow.

require __DIR__ . '/../vendor/autoload.php' ;
$app = require_once __DIR__ . '/../bootstrap/app.php' ;

Then I start the server via port 8000. But the site is loading with 404 errors in console.This is console

This is my folder structure Current folder structure

This is the code for images

@foreach($banners as $banner)
                @if($banner->type == 'Slide 1')
                    <img src="{{asset('uploads')}}/{{$banner->name}}" alt="Compare Prices In Sri Lanka"/>
                @endif
                @if($banner->type == 'Slide 2')
                    <img src="{{asset('uploads')}}/{{$banner->name}}" alt="Price Comparison Website In Sri Lanka"/>
                @endif
                @if($banner->type == 'Slide 3')
                    <img src="{{asset('uploads')}}/{{$banner->name}}" alt="Prices in Sri Lanka"/>
                @endif
            @endforeach

Could anyone please help me on this.Thanks


Solution

  • Create a Public folder in your laravel root directory. Then move all your assets files from the public_html folder to that folder (Laravel Public Folder). Then check again. Should be loaded all assets.