php - Laravel unable to load view -
just started learning laravel tried create route view when load on web browser says sorry, page looking not found. can 1 me out in codeigniter simple create controller , view , can see on web broswer found laravel difficult codigniter true?? can define me how mvc structure laravel5 found tutorials of old laravel , files , structure change got confused suggestions please
routes.php
route::get('main', 'main@index');
main.php
namespace app\http\controller; use illuminate\http\request; use app\http\requests; use app\http\controllers\controller; class main extends contoller { public function _construct() { $this->middleware('guest'); } public function index() { return "hello world controller"; } }
if running laravel project locally, can run through own server. dont need apache server form wamp or xampp,,but need mysql database. start if require database.
now go command prompt, navigate directory project stored eg cd c:/wamp/www/yourprojet , type following command
php artisan serve
it start on port 8000 default. , can access project @ 'http://localhost:8000/'
and can access view @ 'http://localhost:8000/main'
also can find laravel tutorials , other @ laracast
Comments
Post a Comment