Can't create Controller

Published 8 months ago by maxwhite

Hello everyone. I downloaded someone else's project: https://github.com/tomirons/pw-web/ 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

silverxjohn

You need to register the links in routes/web.php.

For example in routes/web.php add this:

Route::get('my-route', '[email protected]');

You can also make a controller by running php artisan make:controller Front/MyController The above command will create a file in app/Http/Controllers/Front/MyController.php

maxwhite

Sorry, Can't insert full text in this discussion. Yes, Before that, I was creating Route::get( 'myc', ['as' => 'myc.index', 'uses' => 'Front\[email protected]'] ); And view for this Controller.

maxwhite

https://codepaste.net/yvau2x Here is full text. Thanks for watching.

silverxjohn

May I have your repository/codes so I could investigate further?

maxwhite

Sure. Is there enough code from the previous posts? I can create personal VPS with this project for you. It's really strange. I'm not a beginner programmer.

silverxjohn

@maxwhite I think this suffice. Did you try: mywebsite.com/myc?

maxwhite

Yes. Still getting error.

silverxjohn

That's weird. You have set it up correctly as far as I could tell. Maybe it's the cache?

try running these command

php artisan config:cache and php artisan view:clear

maxwhite

I tried it. Still keep getting error. And php artisan route:list shows my new route. I can add new actions for existet Controllers, but not for new. Maybe the main problem in the application?!

silverxjohn

Hmm, maybe composer dump will do the trick?

maxwhite

Nope, the same problem.

maxwhite

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.

silverxjohn

Could you send your whole code? This seems interesting.

maxwhite

Sure, here is full source with installation guide: https://github.com/tomirons/pw-web/ Adding a new controller does not take much time. The problem is that it does not work after that but he works on pure laravel 5.1. Or I can create vps with this project and give access to you if you want.

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