I new on laravel 5.0 see error http://i.stack.imgur.com/4ZMgZ.png Here is my controller code
<?php namespace App\Http\Controllers;
use Illuminate\Support\Facades\Input;
class DealerController extends Controller {
public function __construct(){
//$this->middleware('auth');
}
public function login(){
return view('login');
}
public function index() {
return view('login');
}
public function login_auth(){
$dealer_loginname = Input::get('dealer_loginname');
$dealer_password = Input::get('dealer_password');
$dealer_hashed_pass = Hash::make($dealer_password);
}
}
I Hash::make works fine in composer cmd http://i.stack.imgur.com/SqdYs.jpg and its also work on routes file
//Route::post('dealerpanel/login_auth','DealerController@login_auth');
Route::post('dealerpanel/login_auth',function (){
$pass = Hash::make('abc');
die($pass);
//$2y$10$lSG0Dl3NCJ0ubWIwILzPk.SFGeLmwkw03v3NZ5yMgkg4fAry1Cjc2
});
seems like you didn't import Hash
since your using namespaces.
try to add
use Hash;
on top of the DealerController
file like,
<?php namespace App\Http\Controllers;
use Illuminate\Support\Facades\Input;
use Hash;
class DealerController extends Controller {
public function __construct(){....
or just use
$pass = \Hash::make('abc');
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