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

LeFransua's avatar

REST API Laravel 6 on Cpanel

I wanna know if is possible do a rest api with Laravel 6 on Cpanel, I tried do it but it didn't work, i copy .htaccess and index.php from public folder on proyect folder, also i modify index.php

require __DIR__.'/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/bootstrap/app.php';

When I did run this app in test with comand php artisan sever works, if someone can help me please do it.

I send variables in a URL, btw.

0 likes
3 replies
automica's avatar

@DKKA starting a new topic will be your best chance of getting your question answered

1 like

Please or to participate in this conversation.