LaravelDaily / QuickLMS

Simple Learning Management System based on Laravel 5.4.
145 stars 96 forks source link

Error: Object not found #11

Open asha15 opened 4 years ago

asha15 commented 4 years ago

I have created a new controller to redirect for teacher's page when the user selected a course.

This is the code of course page.

<div class="caption"> 
  <h4><a href="{{ route('teachers.show', [$course->id]) }}">{{ $course->title }}</a></h4>
  <p>{{ $course->description }}</p>
</div>

This is the routing code to redirect for teachers controller

Route::get('course/{id}', ['uses' => 'TeachersController@show', 'as' => 'teachers.show']);

This is the function in TeachersController

public function show($courses_id)
{
  return view('teachers');    
}

teachers.blade.php file

<h1>hello wolrd!</h1>
</html>

When i clicked a particular course, it gives me Error Object not founderror

PovilasKorop commented 4 years ago

@asha15 object not found, from what I understand, can be related to the fact that you didn't configure your URL structure, like RewriteRule .htaccess file in Apache, or Nginx config.