Class App/Http/Controllers/View Not Found error

The problem is not the actual view but the class View. You see when you just reference a class like View::make('tickets.bus.index') PHP searches for the class in your current namespace.

In this case that’s App\Http\Controllers. However the View class obviously doesn’t exists in your namespace for controllers but rather in the Laravel framework namespace. It has also an alias that’s in the global namespace.

You can either reference the alias in the root namespace by prepending a backslash:

return \View::make('tickets.bus.index');

Or add an import statement at the top:

use View;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)