php - laravel - blank page generated on call to view -


i have following routes:

       <?php /* |-------------------------------------------------------------------------- | application routes |-------------------------------------------------------------------------- | | here can register of routes application. | it's breeze. tell laravel uris should respond | , give controller call when uri requested. | */ route::get('/', 'pagescontroller@index'); route::get('item', 'itemcontroller@index'); route::get('item/create', 'itemcontroller@create'); route::get('item/{id}', 'itemcontroller@show');  route::get('welcome', function() {     return view('welcome'); }); route::group(['middleware' => 'web'], function () {     route::auth();      route::get('/home', 'homecontroller@index'); }); 

and item controller looks like:

@section('content'); <h1>add  new item</h1> <hr /> <content>     <div class="form-group">     {!! form::open() !!}         {!! form::label('name', "name") !!}         {!! form::text('name', null, ['class' => 'form-control']) !!}     {!! form::close() !!} </content> 

@stopttp\requests;

use app\item; class itemcontroller extends controller { public function index() {     //fetch items database     $items = item::all();     return $items; }  public function show($id) {      $item = item::findorfail($id); }  public function create() {     return view::make('item.create'); }  } 

create.blade.phphere view located @ /resources/views/item/create.blade.php: @section('content');

add new item


{!! form::open() !!} {!! form::label('name', "name") !!} {!! form::text('name', null, ['class' => 'form-control']) !!} {!! form::close() !!} @stop

i trying load item creation method laravel based e-commerce building. can't seem access item.create view when visit route in specified page, blank page when load view; not see view's html. help, please?

heres copoy of log files:

[2016-04-19 17:44:41] local.error: exception 'invalidargumentexception' message 'view [articles.create] not found.' in /home/thomas/ushop/vendor/laravel/framework/src/illuminate/view/fileviewfinder.php:137 stack trace:

0 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/view/fileviewfinder.php(79): illuminate\view\fileviewfinder->findinpaths('articles.create', array)

1 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/view/factory.php(165): illuminate\view\fileviewfinder->find('articles.create')

2 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/foundation/helpers.php(783): illuminate\view\factory->make('articles.create', array, array)

3 /home/thomas/ushop/app/http/controllers/itemcontroller.php(25): view('articles.create')

4 [internal function]: app\http\controllers\itemcontroller->create()

5 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/controller.php(80): call_user_func_array(array, array)

6 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/controllerdispatcher.php(146): illuminate\routing\controller->callaction('create', array)

7 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/controllerdispatcher.php(94): illuminate\routing\controllerdispatcher->call(object(app\http\controllers\itemcontroller), object(illuminate\routing\route), 'create')

8 [internal function]: illuminate\routing\controllerdispatcher->illuminate\routing{closure}(object(illuminate\http\request))

9 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))

10 [internal function]: illuminate\routing\pipeline->illuminate\routing{closure}(object(illuminate\http\request))

11 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php(103): call_user_func(object(closure), object(illuminate\http\request))

12 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/controllerdispatcher.php(96): illuminate\pipeline\pipeline->then(object(closure))

13 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/controllerdispatcher.php(54): illuminate\routing\controllerdispatcher->callwithinstack(object(app\http\controllers\itemcontroller), object(illuminate\routing\route), object(illuminate\http\request), 'create')

14 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/route.php(174): illuminate\routing\controllerdispatcher->dispatch(object(illuminate\routing\route), object(illuminate\http\request), 'app\http\contro...', 'create')

15 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/route.php(140): illuminate\routing\route->runcontroller(object(illuminate\http\request))

16 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/router.php(724): illuminate\routing\route->run(object(illuminate\http\request))

17 [internal function]: illuminate\routing\router->illuminate\routing{closure}(object(illuminate\http\request))

18 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))

19 [internal function]: illuminate\routing\pipeline->illuminate\routing{closure}(object(illuminate\http\request))

20 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php(103): call_user_func(object(closure), object(illuminate\http\request))

21 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/router.php(726): illuminate\pipeline\pipeline->then(object(closure))

22 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/router.php(699): illuminate\routing\router->runroutewithinstack(object(illuminate\routing\route), object(illuminate\http\request))

23 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/router.php(675): illuminate\routing\router->dispatchtoroute(object(illuminate\http\request))

24 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(246): illuminate\routing\router->dispatch(object(illuminate\http\request))

25 [internal function]: illuminate\foundation\http\kernel->illuminate\foundation\http{closure}(object(illuminate\http\request))

26 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))

27 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/foundation/http/middleware/checkformaintenancemode.php(44): illuminate\routing\pipeline->illuminate\routing{closure}(object(illuminate\http\request))

28 [internal function]: illuminate\foundation\http\middleware\checkformaintenancemode->handle(object(illuminate\http\request), object(closure))

29 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php(124): call_user_func_array(array, array)

30 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline{closure}(object(illuminate\http\request))

31 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))

32 [internal function]: illuminate\routing\pipeline->illuminate\routing{closure}(object(illuminate\http\request))

33 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/pipeline/pipeline.php(103): call_user_func(object(closure), object(illuminate\http\request))

34 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(132): illuminate\pipeline\pipeline->then(object(closure))

35 /home/thomas/ushop/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(99): illuminate\foundation\http\kernel->sendrequestthroughrouter(object(illuminate\http\request))

36 /home/thomas/ushop/public/index.php(54): illuminate\foundation\http\kernel->handle(object(illuminate\http\request))

37 {main}

  1. you said return view::make('item.create');, should return view::make('item.create'); or return view('item.create');

  2. logs , code saying different things. logs talk view [articles.create] not found, code talks item.create view. sure pointing correct route <=> controller ? maybe try clear cache


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -