Laravel How is the website hosted without the presence of code in local files?

Viewed 42

I am curious I have purchased a theme from Theme Forest. I was working on a Laravel project, so I just purchased this theme just to analyse the code and how it was designed. I am new to Laravel. So I thought it would be good to analyse other codes. I have purchased a theme from ThemeForest. But after checking the routes, there are only routes in web.php, so I don't know where the routes are located. I checked everywhere, but they are not located. So I checked resources->views, which only contained 2 files . So I am curious how the website will work when I host it on my hosting server. Why not? I am able to view the code . When I put these files on hosting, it starts with setup, but after setting up, I am still not able to view the code . Is the website code loaded through a server or something like that ? I have also attached a folder structure of that project.

folder structure

web.php

Route::get('/', function () {
    if (file_exists(storage_path('installed'))) {
        if (!is_null(config('app.front_url'))) {
            return redirect(config('app.front_url'));
        }
        return response()->json('Success');
    } else {
        Artisan::call('config:clear', []);
        \View::addLocation(base_path() . '/Modules/Installer/Views');
        \View::addNamespace('theme', base_path() . '/Modules/Installer/Views');
        return View::make('theme::welcome');
    }
})->name('index');

// Application cache cleared.
Route::get('/cache-clear', function () {
    Artisan::call('cache:clear');
    return "Application cache cleared!";
});

// Configuration cached.
Route::get('/config-cache', function () {
    Artisan::call('config:cache');
    return "Configuration cache cleared!<br>Configuration cached successfully!";
});

// phpinfo.
// Route::get('/phpinfo', function() {
//    return response()->json([
//     'stuff' => phpinfo()
//    ]);
// });

// Schedule run via URL.
// Route::get('schedule/run', function () {
//     Artisan::call('schedule:run', [], $outputLog);
// });

// Route::get('/artisan/{cmd}/', function ($cmd) {
//     $outputLog = new BufferedOutput;
//     pr("php artisan " . $cmd);
//     Artisan::call($cmd, [], $outputLog);
//     pr($outputLog);
//     return "Done!";
// });

// Queue work.
// Route::get('/queue/work', function () {
//     $r = Artisan::call('queue:work');
//     pr($r);
//     return "Done!";
// });

Totals: Files: 9136 Directories: 2333 Size: 6,97,00,733 bytes Size on disk: 16,11,16,160 bytes

command ls -lah

total 847K
4.0K drwxr-xr-x 1 ramesh 197121    0 Sep 23 21:55 ./
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:20 ../
1.0K -rw-r--r-- 1 ramesh 197121  228 Feb  4  2020 .editorconfig
4.0K -rw-r--r-- 1 ramesh 197121 1.2K Jun  7 15:51 .env
4.0K -rw-r--r-- 1 ramesh 197121 1.2K May 24 16:17 .env.example
1.0K -rw-r--r-- 1 ramesh 197121  116 Feb  4  2020 .gitattributes
1.0K -rw-r--r-- 1 ramesh 197121  248 Dec 15  2020 .gitignore
1.0K -rw-r--r-- 1 ramesh 197121  408 May  9 18:56 .htaccess
8.0K drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 Modules/
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 app/
4.0K -rwxr-xr-x 1 ramesh 197121 1.7K Feb  4  2020 artisan*
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 bootstrap/
4.0K -rw-r--r-- 1 ramesh 197121 2.2K May 20 15:52 composer.json
240K -rw-r--r-- 1 ramesh 197121 239K Dec  5  2020 composer.lock
4.0K drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 config/
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 database/
352K -rwxr-xr-x 1 ramesh 197121 352K Nov  4  2020 du.exe*
4.0K -rw-r--r-- 1 ramesh 197121 2.3K Jun  3 14:41 index.html
184K -rw-r--r-- 1 ramesh 197121 181K Jun  6 22:27 install.sql
4.0K -rw-r--r-- 1 ramesh 197121 1.2K Apr 10  2020 package.json
4.0K -rw-r--r-- 1 ramesh 197121 1.2K Feb  4  2020 phpunit.xml
4.0K drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 public/
8.0K -rw-r--r-- 1 ramesh 197121 4.1K Feb  4  2020 readme.md
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 resources/
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 routes/
1.0K -rw-r--r-- 1 ramesh 197121  584 Feb  4  2020 server.php
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 storage/
   0 drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:10 tests/
8.0K drwxr-xr-x 1 ramesh 197121    0 Sep 23 12:14 vendor/
1.0K -rw-r--r-- 1 ramesh 197121    3 Jun  7 15:52 version.txt
1.0K -rw-r--r-- 1 ramesh 197121  557 Sep  8  2020 webpack.mix.js

0 Answers
Related