public function postSendMessage() { $input = Input::all(); $file_name = Input::hasFile('kid_image') ? $this->upload_file($input['kid_image']) : ''; $input['kid_image'] = $file_name; $input['report_by'] = Auth::org()->get()->uid; Messages::create($input); return Redirect::back()->with('success', 'Message Sent Successfully'); }
public function getProfile() { $user_data = Auth::org()->get(); return View::make('organisation.profile')->with('user_data', $user_data); }
public function getLogout() { Auth::org()->logout(); return Redirect::to('front/organization-login')->with('success', 'Logged Out Successfully'); }
<?php $uid = Auth::org()->get()->uid; $not_count = Notifications::where('user_id', $uid)->where('is_read', 0)->get()->count(); ?> <html> <head> <title> @section('title') @show </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> {{HTML::style('front/css/bootstrap.css')}} {{HTML::style('admin/css/font-awesome.min.css')}} {{HTML::script('front/js/jquery.min.js')}} {{HTML::script('admin/bootstrap/js/bootstrap.min.js')}} {{HTML::script('front/js/move-top.js')}} {{HTML::script('front/js/easing.js')}} {{HTML::script('admin/js/angular.js')}} {{HTML::style('front/css/style.css')}} {{HTML::style('front/css/sidebar.css')}} <script> $(function() { var pull = $('#pull'); menu = $('nav ul'); menuHeight = menu.height(); $(pull).on('click', function(e) {
public function postOrganizationLogin($custom = null) { $rules = array('email' => 'required', 'password' => 'required'); $v = Validator::make(Input::all(), $rules); if ($v->fails()) { return Redirect::back()->withErrors($v); } if ($custom == null) { $custom = array('email' => Input::get('email'), 'password' => Input::get('password')); } Auth::org()->attempt($custom); if (Auth::org()->check()) { if (Auth::org()->get()->status == 0) { return Redirect::back()->with('failure', 'Please Verify Your Account. Verification Link is Sent on Your Email'); } return Redirect::to('organization/home'); } else { return Redirect::back()->with('failure', 'Invalid Username Or Password'); } }
//Route::filter('auth.basic', function() //{ // return Auth::basic(); //}); Route::filter('auth', function () { if (Auth::admin()->guest()) { return Redirect::guest('admin/login')->with('failure', 'You Are Not Logged In!!'); } }); Route::filter('user', function () { if (Auth::user()->guest()) { return Redirect::guest('front/login')->with('failure', 'You Are Not Logged In!!'); } }); Route::filter('org', function () { if (Auth::org()->guest()) { return Redirect::guest('front/organization-login')->with('failure', 'You Are Not Logged In!!'); } }); /* |-------------------------------------------------------------------------- | Guest Filter |-------------------------------------------------------------------------- | | The "guest" filter is the counterpart of the authentication filters as | it simply checks that the current user is not logged in. A redirect | response will be issued if they are, which you may freely change. | */ Route::filter('guest', function () { if (Auth::check()) {
public function getIndex() { $uid = Auth::org()->get()->uid; $data = Notifications::where('user_id', $uid)->get(); return View::make('organisation.notifications')->with('data', $data); }