php - After removing public from laravel controller not working? -
i have installed laravel 5 , localhost/laravel/public showing landing page of laravel. once created controller hello using php artisan command , created htaccess file below hello controller showing page not found. please me resolve error
rewriteengine on rewriterule ^(.*)$ public/$1 [l]
routes.php file
route::get('/', function () { return view('welcome'); }); route::get('/hello', 'hello@index');
hello.php controller file
<?php namespace app\http\controllers; use illuminate\http\request; use app\http\requests; class hello extends controller { public function index() { echo "test"; } }
it funny true thing controller not depend on public folder. if copy files of public folder directory , includes other files index.php perfectly,surely work.
require __dir__.'/../bootstrap/autoload.php'; /* |-------------------------------------------------------------------------- | turn on lights |-------------------------------------------------------------------------- | | need illuminate php development, let turn on lights. | bootstraps framework , gets ready use, | load application can run , send | responses browser , delight our users. | */ $app = require_once __dir__.'/../bootstrap/app.php';
change 2 line directory index.php can include both file perfectly.
Comments
Post a Comment