Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PhoeniX5's avatar

How to display views when hosting a Laravel project on internet ?

I need to access to my view folder and files when hosting my Laravel app, so far i have access to the index file by doing subdomain/public but i get error 404, so i need to access the views in ressources folder.

This is my route :

<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/support', 'DemoController@index');

Route::get('/support/postdata', 'DemoController@postdata')->name('support.postdata');

Route::get('/support/requete', 'DemoController@requete')->name('support.requete');

Route::get('/support/getetat', 'DemoController@getetat')->name('support.getetat');

Route::post('/support/checklogin', 'DemoController@checklogin');
Route::get('support/successlogin', 'DemoController@successlogin');
Route::get('support/logout', 'DemoController@logout');

Route::get('/admin', 'DemoController@successlogin');

Route::get('admin/getRequete', 'DemoController@getRequete')->name('admin.getRequete');

Route::get('admin/reponse', 'DemoController@reponse')->name('admin.reponse');

Route::get('admin/fetchdata', 'DemoController@fetchdata')->name('admin.fetchdata');
0 likes
8 replies
munazzil's avatar

You can access through your command prompt or your terminal.

for example-

cd c:/xampp/localhost/project/resources
PhoeniX5's avatar

@JLRDW - I need to host my app in a shared server, so I downloaded my app in the server then I imported the database but i have no views, how do I display my views as in a local server (127.0.0.1:8000/support) as (subdomain/support), like in the route file ?

pardeepkumar's avatar

I suggest you to check your routes files and .env file url according to your server url . like abc.com/public etc .

niseku's avatar

What does the storage/logs/laravel.log say?

rexomnis's avatar

What is your operating system of your web server?

What web server are you using (nginx, apache, etc)?

Please or to participate in this conversation.