src/controllers/LoginController.php
public static function getIndex() {
		
		//show install form
		try {
			if (!DB::table(config('center.db.users'))->count()) return view('center::login.install');
		} catch (\Exception $e) {
			if ($e->getCode() == 2002) {
				trigger_error('Center needs a valid database connection.');
			}
		}

		return view('center::login.index');
	}
public static function getIndex() {
		
		//show install form
		try {
			if (!DB::table(config('center.db.users'))->count()) return view('center::login.install');
		} catch (\Exception $e) {
			if ($e->getCode() == 2002) {
				trigger_error('Center needs a valid database connection.');
			}
		}

		return view('center::login.index');
	}
public static function getIndex ( ) { //show install form try { if ( ! DB :: table ( config ( 'center.db.users' ) ) -> count ( ) ) return view ( 'center::login.install' ) ; } catch ( \ Exception $ e ) { if ( $ e -> getCode ( ) == 2002 ) { trigger_error ( 'Center needs a valid database connection.' ) ; } } return view ( 'center::login.index' ) ; }
show login page if not logged in
show login page if not logged in