src/libraries/Trail.php
public static function manage() {

		$back = (Session::has('back')) ? Session::get('back') : [];

		if (URL::current() == end($back)) {
			//going back down the stack
			array_pop($back);
		} elseif (URL::previous() != end($back)) {
			//going up the stack
			$back[] = URL::previous();
		}

		//persist
		if (count($back)) {
			Session::set('back', $back);
		} elseif (Session::has('back')) {
			Session::forget('back');
		}

	}
public static function manage() {

		$back = (Session::has('back')) ? Session::get('back') : [];

		if (URL::current() == end($back)) {
			//going back down the stack
			array_pop($back);
		} elseif (URL::previous() != end($back)) {
			//going up the stack
			$back[] = URL::previous();
		}

		//persist
		if (count($back)) {
			Session::set('back', $back);
		} elseif (Session::has('back')) {
			Session::forget('back');
		}

	}
public static function manage ( ) { $ back = ( Session :: has ( 'back' ) ) ? Session :: get ( 'back' ) : [ ] ; if ( URL :: current ( ) == end ( $ back ) ) { //going back down the stack array_pop ( $ back ) ; } elseif ( URL :: previous ( ) != end ( $ back ) ) { //going up the stack $ back [ ] = URL :: previous ( ) ; } //persist if ( count ( $ back ) ) { Session :: set ( 'back' , $ back ) ; } elseif ( Session :: has ( 'back' ) ) { Session :: forget ( 'back' ) ; } }
manage the return stack
manage the return stack