I have installed laravel 5 and localhost/laravel/public showing landing page of laravel. once i created a controller hello using php artisan command and created htaccess file like below the hello controller showing page not found. Please help me to resolve this 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";
}
}