Back

Can't create Controller


Hello everyone. I downloaded someone else's project: github I was able to install it and my browser is displaying what is should, news page, vote page, etc. It works well. However, views I create are giving me a custom 404 error Page not found.

Here is what I have done so far: I created a controller in /var/www/html/lk/app/Http/Controllers/Front/MycController.php

<?php

namespace App\Http\Controllers\Front;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;

class MycController extends Controller
{
    public function getIndexx()
    {
        return view( 'front.myc.index' );
    }
}

Then I created a view in /var/www/html/lk/resources/views/front/myc/index.blade.php

Here is the code behind the index.blade.php file

@extends( 'front.header' )
@section( 'content' )
        <p>1</p>
@endsection

Finally I created a route in /var/www/html/lk/app/Http/routes.php

Route::get( 'myc', ['as' => 'myc.index', 'uses' => 'Front\[email protected]'] );

But for some reason I keep getting custom 404 error Page not found. I tried everything. What am I doing wrong? How can I fix this problem? Thanks.

maxwhite replied 4 months ago

I downloaded clear laravel 5.1 and tried to add new pages. And it's works. So problem in app. Any fixes for this app? Please.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us