I have read other questions in this forum to fix this problem, but nothing helped me.
I'm receiving this error only in one folder in other folder laravel works perfect no errors. Error is:
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
The code i using. homa.blade.php
<section>
<h2><a href="{{ URL::action('post-show', $post->slug) }}">{{ $post->title }}</a></h2>
{{ Markdown::parse(Str::limit($post->body, 300)) }}
<a href="{{ URL::action('post-show', $post->slug) }}">Read more →</a>
</section>
routes.php
Route::get('/posts/{$slug}', array(
'as' => 'post-show',
'uses' => 'PostController@getShow'
));
and controller is PostController.php
<?php
class PostController extends BaseController {
public function getShow($slug) {
echo 'Tets';
}
}
This is all my code nothing more.
homa.blade.phpthe view you get from a subfolder, and not rootyourwebsite.com/?youwebsite.comis rooting but toyouwebsite.com/posts/topic-name-heregot error<a href="...">is correct, but going to that url causes the problem right? Or is it wrong from the url produced?Route::get('/posts/{$slug}')with$i should use without. :)