View [categories.create.blade.php] not found.

Published 4 months ago by anand1100

return view('categories.create'); not abol to access the file inside view/catogories/create.blade.php

public function create() { return view('categories.create'); }

web.php Route::resource('/categories', 'CategoryController');

Best Answer (As Selected By anand1100)
jcmargentina

delete :

@extends('main')

see what happends

coderathore

Can I see your code .....

topvillas

You've got two spellings of categories/catogories.

anand1100

View [main] not found. (View: D:\gispcms\resources\views\categories\create.blade.php)

  1. web.php

Route::get('/category', '[email protected]');

Route::get('/language', '[email protected]');

Route::get('/country', '[email protected]');

Route::resource('/categories', 'CategoryController');

CategoryController.php

public function create()
{
    //
    return view('categories.create');
}
coderathore

Send me screenshot of error because i didn't understand the problem through your code .....

anand1100

i'm not able to share screen shot i dont know how to share that

tykus
tykus
4 months ago (521,110 XP)

The error you have posted above says that View [main] not found - the issue therefore is not with the categories.create view, but most likely with the layout it attempts to extend; do you have a main.blade.php layout in the resources/views directory?

anand1100

i didn't create that file i take i have view/layouts/app.blade.php file

tykus
tykus
4 months ago (521,110 XP)

Can you share your categories/create.blade.php view template?

anand1100

view/categories/create.blade.php

@extends('layouts.app') @section('title', '| Category') @section('content')

Sidebar
            <div class="panel-body">
                What's New?

@extends('main')

@section('title', '| Create New Category')

@section('content')

<div class="col-md-8 col-md-offset-2">
    <h2>Create New Category</h2>
    <hr>
</div>

@endsection

tykus
tykus
4 months ago (521,110 XP)

This...

@extends('main')

... what is it doing?

jcmargentina

delete :

@extends('main')

see what happends

Please sign in or create an account to participate in this conversation.