Object not found error - When creating new pages in Laravel

Viewed 308

I am new in Laravel. I am trying to create a new page named as "contact". But i am getting a Object not found error when i am trying to access the contact page

URL: project-name/contact

please help me

---routes file

<?php

Route::get('/','WelcomeController@index');
Route::get('contact','WelcomeController@contact');

Route::group(['middleware' => ['web']], function () {
    //
});

--- Welcome controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class WelcomeController extends Controller
{
    public function index(){
        return view('welcome');
    }

    public function contact(){
        return 'Contact page goes here...';
    }
}
2 Answers
Related