vendredi 4 mars 2016

Error while redirecting ??? My redirection is not working properly?

routes.php

Route::get('login', [ 'as' => 'login', 'uses' => 'Auth\AuthController@getlogin']);

controller.php

<?php namespace App\Http\Controllers;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Http\Request;
use App\User;
class RegistrationController extends Controller {

    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function confirm($confirmation)

    {
        if( ! $confirmation)
        {
            //throw new InvalidConfirmationCodeException;
            return Redirect::route('Home');
        }

        $user = User::whereconfirmation($confirmation)->first();

        if ( ! $user)
        {
             return Redirect::route('Home');
            //throw new InvalidConfirmationCodeException;
        }

        $user->status = 1;
        //$user->confirmation_code = null;
        $user->save();

        //Flash::message('You have successfully verified your account.');

      **return Redirect::route('login');**
    }




    }

I am getting the following error and donot have any idea to solve them??

FatalErrorException in 442db26e4597edca62a86dfdb187ad32 line 19: Call to undefined function to().

Whats that type of error in laravel i donot have any idea regarding the error ?? Please give me some idea for the problem..

Thankyou...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VUKe4J
via IFTTT

Aucun commentaire:

Enregistrer un commentaire