protected function get_checkbox_checked_state( $name, $value, $checked ) {
		$request = $this->request( $name );

		if ( ! $request && null !== $this->session && ! $this->old_input_is_empty() && is_null( $this->old( $name ) ) ) {
			return false;
		}

		if ( $this->missing_old_and_model( $name ) && is_null( $request ) ) {
			return $checked;
		}

		$posted = $this->get_value_attribute( $name, $checked );

		if ( is_array( $posted ) ) {
			return in_array( $value, $posted );
		}

		if ( $posted instanceof Collection ) {
			return $posted->contains( 'id', $value );
		}

		return (bool) $posted;
	}
protected function get_checkbox_checked_state( $name, $value, $checked ) {
		$request = $this->request( $name );

		if ( ! $request && null !== $this->session && ! $this->old_input_is_empty() && is_null( $this->old( $name ) ) ) {
			return false;
		}

		if ( $this->missing_old_and_model( $name ) && is_null( $request ) ) {
			return $checked;
		}

		$posted = $this->get_value_attribute( $name, $checked );

		if ( is_array( $posted ) ) {
			return in_array( $value, $posted );
		}

		if ( $posted instanceof Collection ) {
			return $posted->contains( 'id', $value );
		}

		return (bool) $posted;
	}
protected function get_checkbox_checked_state ( $ name , $ value , $ checked ) { $ request = $ this -> request ( $ name ) ; if ( ! $ request && null !== $ this -> session && ! $ this -> old_input_is_empty ( ) && is_null ( $ this -> old ( $ name ) ) ) { return false ; } if ( $ this -> missing_old_and_model ( $ name ) && is_null ( $ request ) ) { return $ checked ; } $ posted = $ this -> get_value_attribute ( $ name , $ checked ) ; if ( is_array ( $ posted ) ) { return in_array ( $ value , $ posted ) ; } if ( $ posted instanceof Collection ) { return $ posted -> contains ( 'id' , $ value ) ; } return ( bool ) $ posted ; }
Get the check state for a checkbox input.

@param  string $name
@param  mixed  $value
@param  bool   $checked
@return bool
Get the check state for a checkbox input .