I am new for laravel 5.3.Now i have created a form and when i submit my form it shows an error like
ReflectionException in Container.php line 749: Class App\Http\Controllers\registration does not exist
- in Container.php line 749
- at ReflectionClass->__construct('App\Http\Controllers\registration') in Container.php line 749
- at Container->build('App\Http\Controllers\registration', array()) in Container.php line 644
- at Container->make('App\Http\Controllers\registration', array()) in Application.php line 709
- at Application->make('App\Http\Controllers\registration') in Route.php line 203 at Route->getController() in Route.php line 316
- at Route->controllerMiddleware() in Route.php line 278
- at Route->gatherMiddleware() in Router.php line 655
- at Router->gatherRouteMiddleware(object(Route)) in Router.php line 635
- at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
- at Router->dispatchToRoute(object(Request)) in Router.php line 596
- at Router->dispatch(object(Request)) in Kernel.php line 268
- at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) in Pipeline.php line 53
- at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
- at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
- at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33
- at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104
- at Pipeline->then(object(Closure)) in Kernel.php line 150
- at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
- at Kernel->handle(object(Request)) in index.php line 53
- at require_once('C:\xampp\htdocs\laravel_demo\public\index.php') in server.php line 21
I have a route like
Route::resource('registration','RegistrationController');
Route::post('store','registration@store');
Here my RegistrationController is renamed as registration
My RegistrationController:
<?php
namespace App\Http\Controllers;
use DB;
use Illuminate\Http\Request;
use App\RegistrationModel;
class RegistrationController extends Controller
{
public function index()
{
// $uers=DB::table('tset')->get();
//return $uers;
return view('pages.registration');
// return view('pages.registration')->with('users',$uers); //return users from db
}
public function store()
{
}
}
My view page:
{{Form::open(array('action' => 'registration@store', 'method' => 'post'))}}
<table>
<tr>
<td>
Entr SNO:
</td>
<td>
{!! Form::text('sno', null, ['class' => 'form-control']) !!}
</td>
</tr>
<tr>
<td>
Enter Name:
</td>
<td>
{!! Form::text('sname', null, ['class' => 'form-control']) !!}
</td>
</tr>
<tr>
<td>
Enter Course:
</td>
<td>
{!! Form::text('course', null, ['class' => 'form-control']) !!}
</td>
</tr>
<tr>
<td>
Entr SNO:
</td>
<td>
{{ Form::select('number', [1, 2, 3], null, ['class' => 'field']) }}
</td>
</tr>
<tr>
<td>
{!! Form::submit('Submitform', ['class' => 'btn btn-primary']) !!}
</td>
</tr>
</table>
{!! Form::close() !!}
I don't know why i get this error when i click on save button for saving a post.Please help me