Mahyar Behzadi
Mahyar Behzadi

Reputation: 18

Call to undefined function App\Http\Controllers\veiw() error in Laravel

I have a problem in my starting codes in Laravel, it's my error :

Error Call to undefined function App\Http\Controllers\veiw()

it's my web.php (routes page) :

    <?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/users', 'UserController@user');

and it's my Controller :

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class UserController extends Controller
{
    public function user() {
        return veiw('index');
    }
}

Hope you help me ...

Upvotes: 0

Views: 2486

Answers (1)

Professor
Professor

Reputation: 908

You mistyped view: It is view, not veiw

Upvotes: 3

Related Questions