This is student.php and my function for admin:
public function admin(Request $request){
if($request->isMethod('get')){
return \View::make('/admin');
}
else
{
$UserData['email'] = Input::get('username');
$UserData['password'] = Input::get('password');
User::create($UserData);
return 'admintest';
//return Redirect::to('/view');
}
}
routes.php
Route::match(['get', 'post'], '/admin', 'student@admin');
This is admin form:
{!! Form::open(array('url' => '/admin')) !!}
<input type="hidden" name="_token" value="{{ csrf_token() }}">
User Name:<br />
<input name="username" type="text" id="username" size="40" />
<br /><br />
Password:<br />
<input name="password" type="password" id="password" size="40" />
<br />
<br />
<br />
<input type="submit" name="button" id="button" value="Log In" />
{!! Form::close() !!}
Don't know why showing error:
InvalidArgumentException in FileViewFinder.php line 137: View [.] not found
If you recently deployed you project to your production server or moved the project to another server, do not forget to clear the app cache by running these commands.
php artisan cache:clear
php artisan view:clear
php artisan config:cache
it should fix it.
Also consider updating your .env
file to match new environment variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With