function dg(){ $user = new User; $user->name = 'Testowy'; $user->email ='testowy@testowy.com'; $user->password = Hash::make('password'); if($user->save()){ return 'Udalo sie'; } }
function proces(){ if(xmlHttp){ try { xmlHttp.open('GET','admin/dg',true); xmlHttp.onreadystatechange = handleRequestStateChange; xmlHttp.send(null); }catch(e){ alert('nie mogle polaczyc sie z serwerm'); } } }